From 3aad06d44a1ddabb68300399e619e12785ac5ccb Mon Sep 17 00:00:00 2001 From: yuxuanhui Date: Tue, 4 Aug 2026 13:21:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=9A=84=20Docker=20Compose=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.prod.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docker-compose.prod.yml diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 0000000..e70aa17 --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,38 @@ +name: ${COMPOSE_PROJECT_NAME:-zhixing-system} + +services: + server: + build: + context: ./zhixing-server + target: production + restart: unless-stopped + environment: + ZHIXING_APP_ENV: production + ZHIXING_LOG_LEVEL: ${ZHIXING_LOG_LEVEL:-INFO} + init: true + expose: + - "8000" + healthcheck: + test: + - CMD + - python + - -c + - "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz')" + interval: 30s + timeout: 5s + retries: 3 + start_period: 10s + + web: + build: + context: ./zhixing-web + target: production + restart: unless-stopped + depends_on: + server: + condition: service_healthy + environment: + API_UPSTREAM: http://server:8000 + init: true + ports: + - "${ZHIXING_WEB_PORT:-8111}:80"