You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
image: localhost:5000/myapp:latest #Todo change for have the offical pyro-api image on docker hub
6
+
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 5000 #if the port if edited, please inject a new nginx.conf config in the reverseproxy
7
+
volumes:
8
+
- ./src/:/usr/src/app/
9
+
environment:
10
+
- DATABASE_URL=postgresql://pyro_api:pyro_api@db/pyro_api_dev #todo fill here the real values from the vault/env
11
+
- TEST_DATABASE_URL=postgresql://pyro_api_test:pyro_api_test@test_db/pyro_api_dev_test #todo fill here the real values from the vault/env
12
+
- SUPERUSER_LOGIN=superuser #todo fill here the real values from the vault/env
13
+
- SUPERUSER_PWD=superuser #todo fill here the real values from the vault/env
14
+
- QARNOT_TOKEN=${QARNOT_TOKEN}
15
+
- BUCKET_NAME=${BUCKET_NAME}
16
+
- BUCKET_MEDIA_FOLDER=${BUCKET_MEDIA_FOLDER}
17
+
deploy:
18
+
resources: #todo increase the limit if needed
19
+
limits:
20
+
cpus: '0.60'
21
+
memory: 100M
22
+
reservations:
23
+
cpus: '0.50'
24
+
memory: 40M
25
+
replicas: 15# for some load balancing
26
+
restart_policy:
27
+
max_attempts: 3
28
+
condition: on-failure
29
+
update_config:
30
+
parallelism: 3
31
+
delay: 10s
32
+
networks:
33
+
- balance
34
+
cap_drop:
35
+
- ALL #limit the permission of the service
36
+
db:
37
+
image: postgres:12.1-alpine
38
+
volumes:
39
+
- postgres_data:/var/lib/postgresql/data/ #for data persistence
40
+
environment:
41
+
- POSTGRES_USER=pyro_api #todo fill here the real values from the vault/env
42
+
- POSTGRES_PASSWORD=pyro_api #todo fill here the real values from the vault/env
43
+
- POSTGRES_DB=pyro_api_dev #todo fill here the real values from the vault/env
44
+
networks:
45
+
- balance
46
+
47
+
proxytwo:
48
+
image: localhost:5000/mynginx:latest #nginx with some security addition
49
+
ports:
50
+
- 80:6000#todo use https (port 443) when the certificate is ready
0 commit comments