forked from studygolang/studygolang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (70 loc) · 1.55 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
version: '3'
services:
studygolang:
container_name: studygolang
build:
context: .
dockerfile: Dockerfile
ports:
- 8088:8088
networks:
- default
- app_net
depends_on:
- mysql
- redis
external_links:
- redis:redis
- mysql:mysql
volumes:
- ./static:/data/www/studygolang/static
- ./template:/data/www/studygolang/template
- ./config:/data/www/studygolang/config
- ./log:/data/www/studygolang/log
restart: always
nginx:
container_name: nginx
build: ./nginx
depends_on:
- play
links:
- play:play
volumes:
- /data/www:/data/www:rw
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/certs/:/etc/nginx/certs
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./logs/nginx:/var/log/nginx:rw
ports:
- "80:80"
- "443:443"
restart: always
command: nginx -g 'daemon off;'
mysql:
container_name: mysql
image: "mysql/mysql-server:5.7"
networks:
- default
- app_net
ports:
- "3306:3306"
- "33060:33060"
environment:
- MYSQL_ROOT_PASSWORD=123456
volumes:
- ./docker/mysql:/var/lib/mysql
restart: always
redis:
container_name: redis
image: "redis:6.2"
networks:
- default
- app_net
ports:
- "6379:6379"
volumes:
- ./docker/redis:/usr/local/etc/redis
restart: always
networks:
app_net:
external: true