Files
carry-your-live/docker-compose.yml
T
tech08mag 4b6e87c979
Build APK / build (push) Canceled after 0s
docker compose for backend +frontend
2026-08-07 22:30:00 +02:00

48 lines
1.1 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: carry-your-live-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: carry_your_live
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
target: prod
container_name: carry-your-live-api
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/carry_your_live
JWT_SECRET: your-super-secret-jwt-key-change-in-production-min-32-chars
PORT: 3000
NODE_ENV: production
FRONTEND_URL: http://localhost:8081
ports:
- "3000:3000"
frontend:
build:
context: ./carry-your-live
container_name: carry-your-live-web
depends_on:
- backend
ports:
- "8081:8081"
volumes:
postgres_data: