Files
servesync-demo/docker-compose.yml

55 lines
1.0 KiB
YAML

version: '3.8'
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: servesync
POSTGRES_USER: servesync
POSTGRES_PASSWORD: servesync
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U servesync"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
backend:
build: ./backend
environment:
DATABASE_URL: postgresql://servesync:servesync@db:5432/servesync
REDIS_URL: redis://redis:6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
frontend:
build: ./frontend
depends_on:
- backend
restart: unless-stopped
nginx:
build: ./nginx
ports:
- "8092:80"
depends_on:
- backend
- frontend
restart: unless-stopped
volumes:
pgdata: