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.yml
168 lines (157 loc) · 3.61 KB
/
docker-compose.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# 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
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=local:redis:6379
volumes:
- redis-commander:/redis-commander
expose:
- 6379
ports:
- "8081:8081"
dns:
- 8.8.8.8
- 8.8.4.4
networks:
- db
app:
restart: always
build:
context: ${PWD}
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
ports:
- 8888:8888
- 3500:3500
- 9000:9000
dns:
- 8.8.8.8
- 8.8.4.4
networks:
nginx:
ipv4_address: 172.16.1.2
db:
depends_on:
- postgres
- redis
# worker:
# build:
# context: .
# container_name: elisapp_celery
# image: yangricardo/elisapp:latest
# command: celery -A backend worker -E -l info
# volumes:
# - ./app:/app
# expose:
# - 5555
# depends_on:
# - app
# - redis
# networks:
# - db
# Web server based on official nginx image
# Connect external 8000 (which you can access from browser)
# with internal port 8000(which will be linked to app port 8000 in configs)
# Connect local nginx configuration with image configuration
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
# certbot:
# image: certbot/certbot
# volumes:
# - ./config/nginx/certbot/conf:/etc/letsencrypt
# - ./config/nginx/certbot/www:/var/www/certbot
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
pgadmin:
image: dpage/pgadmin4
restart: always
hostname: pgadmin
volumes:
- pgadmin:/var/lib/pgadmin
- pgadmin:/pgadmin4/config_local.py
- pgadmin:/pgadmin4/servers.json
- pgadmin:/certs/server.cert
- pgadmin:/certs/server.key
environment:
PGADMIN_DEFAULT_EMAIL: '[email protected]'
PGADMIN_DEFAULT_PASSWORD: 'elisdbpassword'
ports:
- 8001:80
depends_on:
- postgres
networks:
- db
networks:
nginx:
external:
name: elisapp_network
db:
driver: bridge
volumes:
postgres:
redis:
redis-commander:
pgadmin:
static:
media: