-
Notifications
You must be signed in to change notification settings - Fork 58
/
docker-compose.yml
64 lines (58 loc) · 1.51 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
version: "3.7"
services:
server:
build:
context: ./
target: development-build-stage
ports:
- "${APP_PORT:-3000}:3000"
volumes:
- ./:/app
- /app/node_modules
restart: "unless-stopped"
networks:
- backend
depends_on:
- mysql
- redis
mysql:
image: "mysql:8.0"
environment:
MYSQL_ROOT_PASSWORD: "${TYPEORM_PASSWORD}"
MYSQL_DATABASE: "${TYPEORM_DATABASE}"
MYSQL_USER: "${TYPEORM_USERNAME}"
MYSQL_PASSWORD: "${TYPEORM_PASSWORD}"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
ports:
- "${FORWARD_DB_PORT:-3306}:3306"
volumes:
- "backendmysql:/var/lib/mysql"
networks:
- backend
healthcheck:
test: ["CMD", "mysqladmin", "ping"]
redis:
image: "redis:alpine"
ports:
- "${FORWARD_REDIS_PORT:-6379}:6379"
volumes:
- "backendredis:/data"
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
mailhog:
image: "mailhog/mailhog:latest"
ports:
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
networks:
- backend
networks:
backend:
driver: bridge
volumes:
backendmysql:
driver: local
backendredis:
driver: local