-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
66 lines (60 loc) · 1.43 KB
/
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
services:
mysql:
image: 'mysql:latest'
environment:
- 'MYSQL_DATABASE=example'
- 'MYSQL_PASSWORD=suhFuq-miptap-recvo5'
- 'MYSQL_ROOT_PASSWORD=suhFuq-miptap-recvo5'
- 'MYSQL_USER=example'
ports:
- '3306'
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent" ]
interval: 60s
retries: 5
start_period: 10s
volumes:
- db_data1:/var/lib/mysql
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass abcdefg
volumes:
- cache:/data
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
ME_CONFIG_BASICAUTH: false
backend:
build: .
ports:
- "8080:8080"
depends_on:
mysql:
# waiting until the db is ready, make sure the migration will success
condition: service_healthy
proxy:
image: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- backend
volumes:
db_data1:
cache: