wedding-planner/docker-compose.yml
Manuel Bustillo 6c6ae62e5a
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m7s
Add copyright notice / copyright_notice (pull_request) Successful in 1m18s
Run unit tests / unit_tests (pull_request) Successful in 2m16s
Define model and endpoints to store affinity between group pairs
2024-12-26 20:29:06 +01:00

83 lines
1.8 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
tty: true
stdin_open: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/up"]
interval: 10s
timeout: 5s
retries: 5
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
healthcheck:
test: wget -qO - http://localhost:3000/api/health || exit 1
interval: 10s
timeout: 5s
retries: 5
depends_on:
- backend
volumes:
- ../wedding-planner-frontend/:/app
libre-captcha:
image: librecaptcha/lc-core:latest
volumes:
- "./tmp/libre-captcha-data:/lc-core/data"
- "./libre-captcha-config.json:/lc-core/data/config.json"
ports:
- 8888
nginx:
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
frontend:
condition: service_healthy
backend:
condition: service_healthy
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