forked from rookies-sysu/Order-System-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (60 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
63 lines (60 loc) · 1.06 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
version: '3'
services:
db:
restart: always
build: db/.
environment:
MYSQL_ROOT_PASSWORD: tiny-hippo
MYSQL_DATABASE: TINYHIPPO
MYSQL_USER: tiny
MYSQL_PASSWORD: tiny-hippo
ports:
- "3306:3306"
volumes:
- /opt/mysql_data:/var/lib/mysql
networks:
- db_nw
web:
restart: always
build: app/.
volumes:
- ./app:/code/app
working_dir: /code/app
command: bash -c "/code/app/docker-entrypoint.sh"
environment:
ENV: DEV
depends_on:
- db
- redis
networks:
- db_nw
- web_nw
- redis_nw
stdin_open: true
tty: true
redis:
image: "redis:alpine"
networks:
- redis_nw
ports:
- "6379:6379"
nginx:
build:
context: .
dockerfile: ./nginx/Dockerfile
restart: always
ports:
- "8080:80"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- web
networks:
- web_nw
networks:
db_nw:
driver: bridge
web_nw:
driver: bridge
redis_nw:
driver: bridge