diff --git a/app/api/v1/api.py b/app/api/v1/api.py
index 09f186d..0b1191d 100644
--- a/app/api/v1/api.py
+++ b/app/api/v1/api.py
@@ -10,7 +10,7 @@ api = APIBlueprint('api', __name__)
@api.get('/hello')
def hello():
- result_one = f'我是您的专属接口提供服务器: {os.environ["HOSTNAME"]}'
+ result_one = f'我是您的专属接口提供服务器:'
result_two = f'我的机器参数如下'
result_three = f'操作系统:{platform.system()}'
text = """
@@ -59,6 +59,8 @@ def hello():
""" + result_one + """
+
+ """ + f'{os.environ["HOSTNAME"]} ' + f'进程 {socket.gethostname()}' + """
diff --git a/docker-compose.yml b/docker-compose.yml
index bb32ad8..a687844 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,8 +5,6 @@ services:
build:
context: .
dockerfile: ./Dockerfile
- container_name: pzx-web-api
- hostname: pzx-web-api
ports:
- "5010:5000"
volumes:
@@ -21,3 +19,6 @@ services:
tty: true
restart: always
command: ["sh", "docker-deploy.sh"]
+ deploy:
+ mode: replicated
+ replicas: 3