forked from qiwihui/codedays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
94 lines (91 loc) · 2.15 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
version: '2'
services:
codedays-server:
container_name: codedays-server
restart: always
image: qiwihui/codedays:latest
# command: /usr/local/bin/gunicorn --workers=4 --bind :8000 cad_server.wsgi:application --reload --log-level info
command: tail -f /dev/null
environment:
TZ: Asia/Shanghai
volumes:
- project:/cad_server
- log:/var/log/codedays/
ports:
- "127.0.0.1:8000:8000"
depends_on:
- codedays-db
- codedays-redis
networks:
- default
codedays-redis:
image: redis:latest
restart: always
container_name: codedays-redis
networks:
- default
codedays-db:
container_name: codedays-db
restart: always
image: mysql:5.7
command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: hollyshit123!@#
MYSQL_USER: codedays
MYSQL_PASSWORD: hollyshit123
MYSQL_DATABASE: codedays
volumes:
- mysql_data:/var/lib/mysql
networks:
- default
codedays-nginx:
container_name: codedays-nginx
restart: always
image: nginx:latest
environment:
VIRTUAL_HOST: codedays.app
LETSENCRYPT_HOST: codedays.app
LETSENCRYPT_EMAIL: [email protected]
ports:
- "80"
volumes:
- project:/cad_server
- frontend:/cad_fe
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
links:
- codedays-server
depends_on:
- codedays-server
networks:
- default
volumes:
project:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/opt/projects/codedays/cad_server'
mysql_data:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/opt/projects/codedays_data/mysql'
frontend:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/opt/projects/codedays/cad_fe/dist'
log:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/var/log/codedays/'
networks:
default:
external:
name: webproxy