This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
123 lines (122 loc) · 2.8 KB
/
docker-compose.prod.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.7'
services:
backend:
build:
context: ./
dockerfile: backend/Dockerfile.prod
command: ../wait-for-it.sh db:5432 -- gunicorn backend.wsgi:application --error-logfile /var/log/error_file_g.log --capture-output --enable-stdio-inheritance --workers 3 --bind 0.0.0.0:8000
volumes:
- ./backend:/home/root/backend
- ./prod/staticfiles:/home/root/backend/static
expose:
- 8000
env_file:
- backend/.env.prod
depends_on:
- db
links:
- db:db
networks:
- djangonetwork
nginx-proxy:
container_name: nginx-proxy
build: ./nginx
restart: always
volumes:
- ./prod/staticfiles:/usr/share/nginx/static
- html:/usr/share/nginx/html
- ./nginx/certs:/etc/nginx/certs
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- 443:443
- 80:80
depends_on:
- backend
- frontend
networks:
- djangonetwork
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
env_file:
- nginx/.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./nginx/certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
depends_on:
- nginx-proxy
networks:
- djangonetwork
mail:
image: tvial/docker-mailserver:latest
hostname: ''
domainname: trackway.cloud
container_name: mail
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- maillogs:/var/log/mail
- ./prod/mailserver:/tmp/docker-mailserver
- ./nginx/certs/:/etc/letsencrypt/live/:ro
environment:
- ONE_DIR=1
# - SMTP_ONLY=1
- SSL_TYPE=letsencrypt
# env_file:
# - mailserver.env
cap_add:
- NET_ADMIN
- SYS_PTRACE
networks:
- djangonetwork
restart: always
frontend:
build:
context: ./
dockerfile: frontend/Dockerfile.prod
volumes:
- html:/home/root/frontend/dist
- /home/root/frontend/node_modules
# env_file:
# - frontend/.env.dev
db:
image: postgis/postgis:9.5-2.5-alpine
container_name: db
volumes:
- ./prod/postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=tracker_app
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=admin
expose:
- 5432
networks:
- djangonetwork
location_server:
image: waysoft/location_server:latest
ports:
- "9050:9050/udp"
depends_on:
- db
links:
- db:db
environment:
- LOCATION_SERVER_PRODUCTION_MODE=TRUE
networks:
- djangonetwork
networks:
djangonetwork:
driver: bridge
volumes:
html:
vhost:
maildata:
mailstate:
maillogs: