Run memcached using docker compose on devcontainer

This commit is contained in:
Rafael Mendonça França 2023-08-05 02:14:11 +00:00
parent a0d7732e1c
commit a96c3713a7
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
4 changed files with 10 additions and 4 deletions

@ -13,7 +13,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \ && apt-get -y install --no-install-recommends \
mariadb-client libmariadb-dev \ mariadb-client libmariadb-dev \
postgresql-client postgresql-contrib libpq-dev \ postgresql-client postgresql-contrib libpq-dev \
memcached \
ffmpeg mupdf mupdf-tools libvips poppler-utils ffmpeg mupdf mupdf-tools libvips poppler-utils

@ -3,8 +3,6 @@ yarn install
sudo chown -R vscode:vscode /usr/local/bundle sudo chown -R vscode:vscode /usr/local/bundle
sudo service memcached start
cd activerecord cd activerecord
# Create PostgreSQL databases # Create PostgreSQL databases

@ -17,7 +17,8 @@
"PGUSER": "postgres", "PGUSER": "postgres",
"PGPASSWORD": "postgres", "PGPASSWORD": "postgres",
"MYSQL_HOST": "mariadb", "MYSQL_HOST": "mariadb",
"REDIS_URL": "redis://redis/0" "REDIS_URL": "redis://redis/0",
"MEMCACHE_SERVERS": "memcached:11211"
}, },
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.

@ -20,6 +20,7 @@ services:
- postgres - postgres
- mariadb - mariadb
- redis - redis
- memcached
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.) # (Adding the "ports" property to this file will not forward from a Codespace.)
@ -54,6 +55,13 @@ services:
volumes: volumes:
- redis-data:/data - redis-data:/data
memcached:
image: memcached:latest
restart: unless-stopped
command: ["-m", "1024"]
networks:
- default
networks: networks:
default: default: