Compare commits
No commits in common. "db1c1a7140d3bf9f3cb0f0a74a7f8bae6ff45cc4" and "185bfd93a2e632c5bb17908b1645bfd69977ff2a" have entirely different histories.
db1c1a7140
...
185bfd93a2
@ -2,13 +2,30 @@ version: "3.4"
|
|||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
queues:
|
queues-nginx:
|
||||||
image: mathwave/sprint-repo:queues
|
image: mathwave/sprint-repo:queues
|
||||||
networks:
|
networks:
|
||||||
- queues-development
|
- common-infra-nginx
|
||||||
environment:
|
environment:
|
||||||
MONGO_HOST: "mongo.develop.sprinthub.ru"
|
MONGO_HOST: "mongo.develop.sprinthub.ru"
|
||||||
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
|
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:
|
||||||
|
- queues
|
||||||
|
environment:
|
||||||
|
MONGO_HOST: "mongo.develop.sprinthub.ru"
|
||||||
|
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
|
||||||
|
NEW: "true"
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
restart_policy:
|
restart_policy:
|
||||||
@ -18,5 +35,7 @@ services:
|
|||||||
order: start-first
|
order: start-first
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
queues-development:
|
common-infra-nginx:
|
||||||
|
external: true
|
||||||
|
queues:
|
||||||
external: true
|
external: true
|
||||||
|
@ -2,13 +2,31 @@ version: "3.4"
|
|||||||
|
|
||||||
|
|
||||||
services:
|
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:
|
queues:
|
||||||
image: mathwave/sprint-repo:queues
|
image: mathwave/sprint-repo:queues
|
||||||
networks:
|
networks:
|
||||||
|
- common-infra-nginx
|
||||||
- queues
|
- queues
|
||||||
environment:
|
environment:
|
||||||
MONGO_HOST: "mongo.sprinthub.ru"
|
MONGO_HOST: "mongo.sprinthub.ru"
|
||||||
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
|
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
|
||||||
|
NEW: "true"
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
restart_policy:
|
restart_policy:
|
||||||
@ -18,5 +36,7 @@ services:
|
|||||||
order: start-first
|
order: start-first
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
common-infra-nginx:
|
||||||
|
external: true
|
||||||
queues:
|
queues:
|
||||||
external: true
|
external: true
|
||||||
|
@ -28,7 +28,7 @@ jobs:
|
|||||||
run: docker push mathwave/sprint-repo:queues
|
run: docker push mathwave/sprint-repo:queues
|
||||||
deploy-dev:
|
deploy-dev:
|
||||||
name: Deploy dev
|
name: Deploy dev
|
||||||
runs-on: [prod]
|
runs-on: [dev]
|
||||||
needs: push
|
needs: push
|
||||||
steps:
|
steps:
|
||||||
- name: login
|
- name: login
|
||||||
@ -40,4 +40,5 @@ jobs:
|
|||||||
- name: deploy
|
- name: deploy
|
||||||
env:
|
env:
|
||||||
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
|
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
|
||||||
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml infra-development
|
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
|
- name: deploy
|
||||||
env:
|
env:
|
||||||
MONGO_PASSWORD_PROD: ${{ secrets.MONGO_PASSWORD_PROD }}
|
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
|
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml infra
|
||||||
|
5
main.py
5
main.py
@ -1,5 +1,6 @@
|
|||||||
import fastapi
|
import fastapi
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
import os
|
||||||
|
|
||||||
from app.routers import take
|
from app.routers import take
|
||||||
from app.routers import put
|
from app.routers import put
|
||||||
@ -18,4 +19,6 @@ mongo.create_indexes()
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
uvicorn.run(app, host="0.0.0.0", port=1239)
|
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