diff --git a/docker-compose.yml b/docker-compose.yml index a687844..14e3168 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,12 @@ version: "3" services: - pzx-web-api: + pzx-web-api-1: build: context: . dockerfile: ./Dockerfile + container_name: pzx-web-api-1 + hostname: pzx-web-api-1 ports: - "5010:5000" volumes: @@ -19,6 +21,25 @@ services: tty: true restart: always command: ["sh", "docker-deploy.sh"] - deploy: - mode: replicated - replicas: 3 + pzx-web-api-2: + build: + 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" ] + +