From d370a83366abdb1734ee6433508a3e054b75ca40 Mon Sep 17 00:00:00 2001 From: Leopoldadmin Date: Tue, 9 Jun 2026 23:41:17 +0000 Subject: [PATCH] Add docker-compose.coolify.yml --- docker-compose.coolify.yml | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docker-compose.coolify.yml diff --git a/docker-compose.coolify.yml b/docker-compose.coolify.yml new file mode 100644 index 0000000..908cd77 --- /dev/null +++ b/docker-compose.coolify.yml @@ -0,0 +1,67 @@ +version: '3.9' + +services: + db: + image: postgres:16-alpine + restart: unless-stopped + environment: + POSTGRES_DB: freetable + POSTGRES_USER: freetable + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + volumes: + - freetable-db-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U freetable"] + interval: 10s + timeout: 5s + retries: 5 + labels: + - "co.anonymous=*" + - "co.logdrain=* + + backend: + build: + context: ./backend + dockerfile: Dockerfile + restart: unless-stopped + environment: + DATABASE_URL: postgresql://freetable:${POSTGRES_PASSWORD}@db:5432/freetable + SECRET_KEY: ${SECRET_KEY} + CORS_ORIGINS: ${CORS_ORIGINS} + APP_NAME: FreeTable + APP_VERSION: 1.0.0 + DEBUG: "false" + depends_on: + db: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + labels: + - "co.anonymous=*" + - "co.logdrain=*" + + frontend: + image: nginx:alpine + restart: unless-stopped + volumes: + - ./frontend/dist:/usr/share/nginx/html:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + ports: + - "80:80" + depends_on: + - backend + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost/health"] + interval: 30s + timeout: 10s + retries: 3 + labels: + - "co.anonymous=*" + - "co.logdrain=*" + +volumes: + freetable-db-data: