62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
ports:
|
|
- 3000
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
|
|
RAILS_ENV: development
|
|
volumes:
|
|
- .:/rails
|
|
workers:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
entrypoint: bin/jobs
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
|
|
RAILS_ENV: development
|
|
volumes:
|
|
- .:/rails
|
|
frontend:
|
|
build:
|
|
context: ../wedding-planner-frontend
|
|
dockerfile: Dockerfile.dev
|
|
ports:
|
|
- 3000
|
|
depends_on:
|
|
- backend
|
|
volumes:
|
|
- ../wedding-planner-frontend/:/app
|
|
nginx:
|
|
image: nginx:latest
|
|
ports:
|
|
- 80:80
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- frontend
|
|
- backend
|
|
db:
|
|
image: postgres:17
|
|
ports:
|
|
- 5432
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
|