This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
96 lines (89 loc) · 1.85 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
# File structure version
version: '3.7'
services:
postgres:
restart: always
shm_size: '512MB'
image: yangricardo/elisdb:latest #postgres:latest
container_name: elisapp_postgres
hostname: postgres
expose:
- 5432
env_file:
- ${PWD}/config/db/.env
networks:
- db
volumes:
- postgres:/data
redis:
restart: always
container_name: elisapp_redis
hostname: redis
image: redis
volumes:
- redis:/data
expose:
- 6379
networks:
- db
app:
restart: always
container_name: elisapp_app
image: yangricardo/elisapp:latest
command : sh /config/on-container-start.sh
hostname: app
env_file:
- ${PWD}/config/app/.env
volumes:
- ${PWD}/app:/app
- ${HOME}/TJ_FILES:/tj_files
- static:/srv/static
- media:/srv/media
expose:
- 8000
dns:
- 8.8.8.8
- 8.8.4.4
networks:
nginx:
ipv4_address: 172.16.1.2
db:
depends_on:
- postgres
- redis
nginx:
image: nginx
container_name: elisapp_nginx
restart: always
hostname: nginx
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
ports:
- 80:80
- 443:443
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- ${PWD}/config/nginx:/etc/nginx/conf.d
- ${PWD}/config/nginx/elisapp.dev.cert:/etc/nginx/elisapp.dev.cert # New Line!
- ${PWD}/config/nginx/elisapp.dev.key:/etc/nginx/elisapp.dev.key # New Line!
- static:/srv/static:ro
- media:/srv/media:ro
depends_on:
- app
networks:
nginx:
ipv4_address: 172.16.1.3
networks:
nginx:
external:
name: elisapp_network
db:
driver: bridge
volumes:
postgres:
redis:
redis-commander:
pgadmin:
static:
media: