Rails
code:docker-compose.yml
services:
app: &app
build: ./docker/app
stdin_open: true
tty: true
working_dir: /app
volumes:
- ./:/app
ports:
- "3000:3000"
environment:
BUNDLE_PATH: vendor/bundle
DATABASE_URL: postgresql://postgres:password@db
REDIS_URL: redis://redis
command: bundle exec rails s -b 0.0.0.0
dev:
<<: *app
ports: []
command: ./bin/dev
db:
image: postgres:14.2-alpine
environment:
POSTGRES_PASSWORD: password
redis:
image: redis:6.0.16-alpine