-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
68 lines (63 loc) · 1.25 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
services:
app:
stdin_open: true
build:
context: .
dockerfile: Dockerfile
container_name: app
ports:
- "3000:3000"
depends_on:
- database
- mongodb
- cache
networks:
- app-network
database:
image: mysql:5.7
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- 'mysql-data:/var/lib/mysql'
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
mongodb:
image: mongo:7-jammy
ports:
- '27017:27017'
volumes:
- dbdata6:/data/db
networks:
- app-network
cache:
image: redis:7.4-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
networks:
- app-network
volumes:
mysql-data:
dbdata6:
cache:
driver: local
networks:
app-network:
driver: bridge