-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (77 loc) · 1.7 KB
/
docker-compose.yml
File metadata and controls
84 lines (77 loc) · 1.7 KB
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
83
84
version: '2'
services:
backend:
image: madina-tic/backend:0.1
volumes:
- migrations:/opt/backend/api/migrations
- static_volume:/opt/backend/static
- media_volume:/opt/backend/media
- ./backups:/opt/backend/backups
networks:
- backend
- backend_postgres
ports:
- 8000:8000
depends_on:
- "postgres"
restart: on-failure
environment:
- PG_HOSTNAME=postgres
- DJANGO_SETTINGS_MODULE=backend.settings
frontend:
image: madina-tic/frontend:0.2
volumes:
- MADINA-TIC-FRONT:/opt/frontend
links:
- nginx
networks:
- backend
ports:
- 5000:5000
depends_on:
- backend
restart: on-failure
nginx:
image: nginx:alpine
ports:
- 80:80
- 443:443
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d
- static_volume:/opt/backend/static
- media_volume:/opt/backend/media
- MADINA-TIC-FRONT:/opt/frontend
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- backend
networks:
- backend
restart: on-failure
postgres:
image: postgres:alpine
environment:
POSTGRES_DB: madina-tic
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- backend_postgres
restart: on-failure
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
volumes:
migrations:
pgdata:
static_volume:
media_volume:
MADINA-TIC-FRONT:
networks:
backend:
backend_postgres: