rails/.devcontainer/compose.yaml

55 lines
1.1 KiB
YAML

services:
rails:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
depends_on:
- postgres
- mariadb
- redis
- memcached
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
postgres:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
mariadb:
image: mariadb:latest
restart: unless-stopped
volumes:
- mariadb-data:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: root
redis:
image: redis:latest
restart: unless-stopped
volumes:
- redis-data:/data
memcached:
image: memcached:latest
restart: unless-stopped
command: ["-m", "1024"]
volumes:
postgres-data:
mariadb-data:
redis-data: