-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
85 lines (82 loc) · 2.37 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker compose reference guide at
# https://docs.docker.com/compose/compose-file/
# Here the instructions define your application as a service called "server".
# This service is built from the Dockerfile in the current directory.
# You can add other services your application may depend on here, such as a
# database or a cache. For examples, see the Awesome Compose repository:
# https://github.com/docker/awesome-compose
version: "3"
networks:
tiktok:
driver: bridge
ipam:
config:
- subnet: 192.168.2.0/24
services:
tiktok:
image: hiifong/tiktok:latest
networks:
tiktok:
ipv4_address: 192.168.2.2
depends_on:
mysql:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./conf/tiktok.yml:/app/conf/tiktok.yml
ports:
- "8080:8080"
mysql:
image: mysql:8.0
restart: always
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_USER=tiktok
- MYSQL_PASSWORD=123456
- MYSQL_DATABASE=tiktok
volumes:
- ./data/mysql/conf:/etc/mysql/conf.d
- ./data/mysql/data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
networks:
tiktok:
ipv4_address: 192.168.2.3
ports:
- "3306:3306"
redis:
image: redis
restart: always
volumes:
- ./data/redis/conf/:/usr/local/etc/redis/
- ./data/redis/data:/data
- ./data/redis/logs/:/logs/
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
networks:
tiktok:
ipv4_address: 192.168.2.4
ports:
- "6379:6379"
minio:
image: bitnami/minio:latest
restart: always
environment:
- MINIO_ROOT_USER=ChYm7ufIwNAOzq6PQPCA
- MINIO_ROOT_PASSWORD=udicP52IwRbmo2hf6lFvjUS7NP5BhlAdsGNIuDE5
- MINIO_DEFAULT_BUCKETS=tiktok:public
volumes:
- ./data/minio/data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
networks:
tiktok:
ipv4_address: 192.168.2.5
ports:
- "9000:9000"
- "9001:9001"