Compare commits
No commits in common. "8849a08930da4b44fca66f51b823a813a34abf6f" and "e3c2f3dea0d6f476aa0795f543aead1599172afd" have entirely different histories.
8849a08930
...
e3c2f3dea0
@ -2,6 +2,22 @@ version: "3.4"
|
||||
|
||||
|
||||
services:
|
||||
queues-nginx:
|
||||
image: mathwave/sprint-repo:queues
|
||||
networks:
|
||||
- common-infra-nginx
|
||||
environment:
|
||||
MONGO_HOST: "mongo.develop.sprinthub.ru"
|
||||
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
|
||||
QUEUES_TOKEN: $QUEUES_TOKEN_DEV
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
queues:
|
||||
image: mathwave/sprint-repo:queues
|
||||
networks:
|
||||
@ -9,6 +25,7 @@ services:
|
||||
environment:
|
||||
MONGO_HOST: "mongo.develop.sprinthub.ru"
|
||||
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
|
||||
NEW: "true"
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
|
@ -2,6 +2,22 @@ version: "3.4"
|
||||
|
||||
|
||||
services:
|
||||
queues-nginx:
|
||||
image: mathwave/sprint-repo:queues
|
||||
networks:
|
||||
- common-infra-nginx
|
||||
environment:
|
||||
MONGO_HOST: "mongo.sprinthub.ru"
|
||||
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
|
||||
QUEUES_TOKEN: $QUEUES_TOKEN_PROD
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
queues:
|
||||
image: mathwave/sprint-repo:queues
|
||||
networks:
|
||||
@ -10,6 +26,7 @@ services:
|
||||
environment:
|
||||
MONGO_HOST: "mongo.sprinthub.ru"
|
||||
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
|
||||
NEW: "true"
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
|
@ -40,4 +40,5 @@ jobs:
|
||||
- name: deploy
|
||||
env:
|
||||
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
|
||||
QUEUES_TOKEN_DEV: ${{ secrets.QUEUES_TOKEN_DEV }}
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml infra
|
||||
|
@ -40,4 +40,5 @@ jobs:
|
||||
- name: deploy
|
||||
env:
|
||||
MONGO_PASSWORD_PROD: ${{ secrets.MONGO_PASSWORD_PROD }}
|
||||
QUEUES_TOKEN_PROD: ${{ secrets.QUEUES_TOKEN_PROD }}
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml infra
|
||||
|
3
main.py
3
main.py
@ -1,5 +1,6 @@
|
||||
import fastapi
|
||||
import uvicorn
|
||||
import os
|
||||
|
||||
from app.routers import take
|
||||
from app.routers import put
|
||||
@ -18,4 +19,6 @@ mongo.create_indexes()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if os.getenv('NEW') == 'true':
|
||||
uvicorn.run(app, host="0.0.0.0", port=1239)
|
||||
uvicorn.run(app, host="0.0.0.0", port=1238)
|
||||
|
Loading…
Reference in New Issue
Block a user