-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.89 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
####################################################
#### File: docker-compose.yml #####################
#### Writer: sungwookLE #####################
#### Initial Build : `docker-compose up --build` ###
#### After Initialization : `docker-compose up` ###
####################################################
version: "3"
services:
oruum:
image: joker1251/oruum-backend:2207-2
container_name : oruum-backend
working_dir: /home/ORUUM-REST-API
ports:
- "8000:8000"
restart: always
command: >
bash -c "
echo yes | python3 manage.py collectstatic
&& python3 manage.py makemigrations
&& python3 manage.py migrate
&& gunicorn backend.wsgi:application -b 0.0.0.0:8000"
depends_on :
- mysql
volumes:
- .:/home/ORUUM-REST-API
links:
- mysql
expose:
- 8000
nginx:
image: joker1251/oruum-nginx:2206
container_name : oruum-nginx
ports:
- "80:80"
- "443:443"
restart: always
volumes:
- .:/home/ORUUM-REST-API
- ./config/nginx:/etc/nginx/conf.d
- ./config/certbot/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
depends_on :
- oruum
certbot:
image: certbot/certbot:v1.26.0
container_name: oruum-ssl
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
restart: always
volumes:
- ./config/certbot/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot
- ./config/certbot/log:/var/log/letsencrypt
mysql:
image: joker1251/oruum-mysql:2206
container_name : oruum-mysql
ports:
- "3306:3306"
restart: always
volumes:
- .:/home/ORUUM-REST-API
environment:
MYSQL_ROOT_PASSWORD: 3102
MYSQL_DATABASE: oruum_db