Skip to content

Commit a96c371

Browse files
committed
Run memcached using docker compose on devcontainer
1 parent a0d7732 commit a96c371

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1313
&& apt-get -y install --no-install-recommends \
1414
mariadb-client libmariadb-dev \
1515
postgresql-client postgresql-contrib libpq-dev \
16-
memcached \
1716
ffmpeg mupdf mupdf-tools libvips poppler-utils
1817

1918

.devcontainer/boot.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ yarn install
33

44
sudo chown -R vscode:vscode /usr/local/bundle
55

6-
sudo service memcached start
7-
86
cd activerecord
97

108
# Create PostgreSQL databases

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"PGUSER": "postgres",
1818
"PGPASSWORD": "postgres",
1919
"MYSQL_HOST": "mariadb",
20-
"REDIS_URL": "redis://redis/0"
20+
"REDIS_URL": "redis://redis/0",
21+
"MEMCACHE_SERVERS": "memcached:11211"
2122
},
2223

2324
// Use 'forwardPorts' to make a list of ports inside the container available locally.

.devcontainer/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
- postgres
2121
- mariadb
2222
- redis
23+
- memcached
2324

2425
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
2526
# (Adding the "ports" property to this file will not forward from a Codespace.)
@@ -54,6 +55,13 @@ services:
5455
volumes:
5556
- redis-data:/data
5657

58+
memcached:
59+
image: memcached:latest
60+
restart: unless-stopped
61+
command: ["-m", "1024"]
62+
networks:
63+
- default
64+
5765
networks:
5866
default:
5967

0 commit comments

Comments
 (0)