-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
70 lines (65 loc) · 1.19 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
version: '3'
networks:
fabu:
driver: bridge
services:
# mysql
db:
container_name: fabu-db
image: mysql:5.7.16
restart: always
environment:
MYSQL_DATABASE: 'fabu'
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'root'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
ports:
- '8805:3306'
networks:
- fabu
# redis
redis:
container_name: fabuex-redis
image: redis:alpine
restart: always
ports:
- '8806:6379'
networks:
- fabu
# 后台API服务
api:
container_name: fabu-api
restart: always
build:
context: ./
dockerfile: docker/api/Dockerfile
working_dir: /go/src/api
volumes:
- ./api:/go/src/api
depends_on:
- db
- redis
environment:
TZ: Asia/Shanghai
ports:
- "8803:8803"
networks:
- fabu
# 前端界面
web:
container_name: fabu-web
restart: always
build:
context: ./
dockerfile: docker/web/Dockerfile
volumes:
- ./web/dist:/usr/share/nginx/html/
environment:
TZ: Asia/Shanghai
ports:
- "8804:8804"
depends_on:
- api
networks:
- fabu