-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
65 lines (64 loc) · 1.36 KB
/
docker-compose.yaml
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
version: '3.3'
services:
# backend:
# build:
# context: .
# dockerfile: docker/Dockerfile-golang
# ports:
# - 8080:8080
# command: ./app --config config.yaml
# volumes:
# - $HOME/.kube/config:/root/.kube/config
# depends_on:
# - mysql
# - redis
# restart: always
# networks:
# network:
# ipv4_address: 172.31.0.100
# frontend:
# build:
# context: .
# dockerfile: docker/Dockerfile-nodejs
# ports:
# - 9999:80
# restart: always
# networks:
# network:
# ipv4_address: 172.31.0.101
mysql:
image: mysql:8.0
ports:
- 3306:3306
volumes:
- mysql_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: demo
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
networks:
network:
ipv4_address: 172.31.0.102
redis:
image: redis:5.0
ports:
- 6379:6379
volumes:
- redis_data:/data
restart: always
environment:
REDIS_PASSWORD: 123456
command: ["bash", "-c",'docker-entrypoint.sh --requirepass "$${REDIS_PASSWORD}"']
networks:
network:
ipv4_address: 172.31.0.103
volumes:
mysql_data: {}
redis_data: {}
networks:
network:
ipam:
driver: default
config:
- subnet: '172.31.0.0/16'