services: postgres: image: postgres:15-alpine environment: POSTGRES_DB: linkforty POSTGRES_USER: linkforty POSTGRES_PASSWORD: changeme volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U linkforty"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 linkforty: build: context: .. dockerfile: examples/Dockerfile depends_on: postgres: condition: service_healthy redis: condition: service_healthy environment: DATABASE_URL: postgresql://linkforty:changeme@postgres:5432/linkforty?sslmode=disable REDIS_URL: redis://redis:6379 NODE_ENV: production PORT: 3000 ports: - "3000:3000" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/sdk/v1/health"] interval: 5s timeout: 5s retries: 10 start_period: 10s restart: unless-stopped volumes: postgres_data: redis_data: