update doc

This commit is contained in:
BryantHe 2023-08-10 13:10:49 +08:00
parent e31d355dc8
commit 99cc82b9e7
1 changed files with 25 additions and 4 deletions

View File

@ -1,10 +1,12 @@
version: "3" version: "3"
services: services:
pzx-web-api: pzx-web-api-1:
build: build:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
container_name: pzx-web-api-1
hostname: pzx-web-api-1
ports: ports:
- "5010:5000" - "5010:5000"
volumes: volumes:
@ -19,6 +21,25 @@ services:
tty: true tty: true
restart: always restart: always
command: ["sh", "docker-deploy.sh"] command: ["sh", "docker-deploy.sh"]
deploy: pzx-web-api-2:
mode: replicated build:
replicas: 3 context: .
dockerfile: ./Dockerfile
container_name: pzx-web-api-2
hostname: pzx-web-api-2
ports:
- "5020:5000"
volumes:
- .:/app
environment:
TZ: "Asia/Shanghai"
LOG_LEVEL: "DEBUG"
env_file:
- .apiflaskenv
- .apiflask.env
working_dir: /app
tty: true
restart: always
command: [ "sh", "docker-deploy.sh" ]