1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00
Maybe/.devcontainer/docker-compose.yml
Joseph Ho 54f5a44a60
devContainer: Use Redis for ActiveJob and ActionCable. (#2017)
* devContainer: Use Redis for ActiveJob and ActionCable

* devContainer: Simplify environment variables for services.

* devContainer: Remove version field as it's no longer required in Compose.
2025-03-24 10:00:42 -04:00

67 lines
1.1 KiB
YAML

x-db-env: &db_env
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
x-rails-env: &rails_env
DB_HOST: db
HOST: "0.0.0.0"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BUNDLE_PATH: /bundle
REDIS_URL: redis://redis:6379/1
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bundle_cache:/bundle
ports:
- "3000:3000"
command: sleep infinity
environment:
<<: *rails_env
depends_on:
- db
- redis
worker:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
command: bundle exec sidekiq
restart: unless-stopped
environment:
<<: *rails_env
depends_on:
- redis
redis:
image: redis:latest
ports:
- "6379:6379"
restart: unless-stopped
volumes:
- redis-data:/data
db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
<<: *db_env
ports:
- "5432:5432"
volumes:
postgres-data:
redis-data:
bundle_cache: