-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.dev.yml
87 lines (82 loc) · 1.81 KB
/
docker-compose.dev.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
app:
stdin_open: true
container_name: app-api-geo-paraguay
build:
context: .
dockerfile: Dockerfile.dev
ports:
- '5000:5000'
depends_on:
- database
- mongodb
- cache
volumes:
- ./:/app
- /app/node_modules
environment:
NODE_ENV: development
DB_HOST: database
DB_PORT: 3306
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
networks:
- app-network
database:
image: mysql:8.0
container_name: database-api-geo-paraguay
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'
- '/db/init.sql:/docker-entrypoint-initdb.d/init.sql'
networks:
- app-network
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'database']
interval: 10s
timeout: 5s
retries: 5
mongodb:
image: mongo:7-jammy
container_name: mongodb-api-geo-paraguay
ports:
- '28017:27017'
volumes:
- dbdata6:/data/db
networks:
- app-network
cache:
image: redis:7.4-alpine
container_name: cache-api-geo-paraguay
ports:
- '6380:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- cache:/data
networks:
- app-network
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${REDIS_PASSWORD}', 'ping']
interval: 10s
timeout: 5s
retries: 5
volumes:
mysql-data:
dbdata6:
cache:
driver: local
networks:
app-network:
driver: bridge