Files
andris-carservice/docker-compose.yml
T
Hermes f7a9906add
Build and publish images / docker (push) Canceled after 0s
carservice: initial commit
2026-07-20 20:51:23 +01:00

44 lines
854 B
YAML

services:
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- "8080:80"
depends_on:
- backend
restart: unless-stopped
backend:
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ENV: production
PORT: "3000"
DATABASE_URL: postgres://app:app@database:5432/app
expose:
- "3000"
depends_on:
database:
condition: service_healthy
restart: unless-stopped
database:
image: postgres:16-alpine
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: app
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d app"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
db-data: