-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathdocker-compose-staging.yaml
82 lines (76 loc) · 2.11 KB
/
docker-compose-staging.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
services:
staging-nest-backend:
container_name: staging-nest-backend
image: arkid15r/owasp-nest-backend:staging
command: >
bash -c "
poetry run python manage.py migrate &&
poetry run python manage.py collectstatic --noinput &&
poetry run gunicorn wsgi:application --bind 0.0.0.0:8000
"
env_file: .env.backend
depends_on:
staging-nest-db:
condition: service_healthy
restart: unless-stopped
networks:
- staging-nest-app-network
- staging-nest-db-network
volumes:
- ./data:/home/owasp/data
staging-nest-certbot:
container_name: staging-nest-certbot
image: certbot/certbot
volumes:
- ./letsencrypt:/etc/letsencrypt
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- staging-certbot-webroot:/var/www/certbot
entrypoint: /bin/sh -c 'trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot --quiet; sleep 12h & wait $${!}; done;'
staging-nest-frontend:
container_name: staging-nest-frontend
image: arkid15r/owasp-nest-frontend:staging
restart: unless-stopped
networks:
- staging-nest-app-network
staging-nest-db:
container_name: staging-nest-db
image: postgres:16.4
env_file: .env.db
healthcheck:
test:
[
'CMD',
'pg_isready',
'-U',
'nest_user_staging',
'-d',
'nest_db_staging',
]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
- ./volumes/db:/var/lib/postgresql/data
networks:
- staging-nest-db-network
staging-nest-nginx:
container_name: staging-nest-nginx
image: nginx:latest
ports:
- '80:80'
- '443:443'
volumes:
- ./letsencrypt:/etc/letsencrypt
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- staging-certbot-webroot:/var/www/certbot
depends_on:
- staging-nest-backend
- staging-nest-frontend
networks:
- staging-nest-app-network
networks:
staging-nest-app-network:
staging-nest-db-network:
volumes:
staging-certbot-webroot: