From a5ddcb8bb79a4ef89346f2dbcbb457fd004d3497 Mon Sep 17 00:00:00 2001 From: Chen Gu Date: Sun, 10 May 2026 16:29:57 +0800 Subject: [PATCH] fix: restore docker-compose.yml with environment variables --- docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..52b8beb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3.8' + +services: + postgres: + image: postgres:16-alpine + container_name: maqt-postgres + environment: + POSTGRES_USER: maqt + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-maqt123456} + POSTGRES_DB: maqt + volumes: + - pgdata:/var/lib/postgresql/data + ports: + - "127.0.0.1:5432:5432" + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "pg_isready -U maqt"] + interval: 5s + timeout: 5s + retries: 5 + + mqsrv: + build: . + container_name: maqt-backend + ports: + - "127.0.0.1:3002:3001" + environment: + - DATABASE_URL=postgresql://maqt:${POSTGRES_PASSWORD:-maqt123456}@postgres:5432/maqt + - JWT_SECRET=${JWT_SECRET} + - ENCRYPTION_KEY=${ENCRYPTION_KEY} + - PORT=3001 + restart: unless-stopped + depends_on: + postgres: + condition: service_healthy + +volumes: + pgdata: