-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
executable file
·91 lines (84 loc) · 2.02 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
88
89
90
91
services:
backend:
build: ./backend
container_name: matcha-backend
environment:
- DATABASE_NAME=${DB_NAME}
- DATABASE_USER=${DB_USER}
- DATABASE_PASSWORD=${DB_PASSWORD}
- DATABASE_HOST=${DB_HOST}
- DATABASE_PORT=${DB_PORT}
- DATABASE_SALT=${SALT}
- FRONTEND_URL=${FRONTEND_URL}
- MAIL_API_KEY=${MAIL_API_KEY}
- DEV_MODE=${DEV_MODE}
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
networks:
- matcha-networks
volumes:
- ./backend/src:/usr/src/app/src
- ./db/profile_image:/usr/src/app/profile_image
restart: unless-stopped
extra_hosts:
- "api.postmarkapp.com:52.14.206.213"
- "api.postmarkapp.com:52.14.145.215"
- "api.postmarkapp.com:3.19.40.22"
frontend:
build: ./frontend
container_name: matcha-frontend
environment:
- PORT=${FRONTEND_PORT}
- REACT_APP_BACKEND_URL=${BACKEND_URL}
- VITE_BACKEND_URL=${BACKEND_URL}
- CHOKIDAR_USEPOLLING=true
ports:
- "4000:4000"
depends_on:
- backend
networks:
- matcha-networks
volumes:
- ./frontend/src:/usr/src/app/src
restart: unless-stopped
db:
build: ./db/
container_name: matcha-db
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_PORT: ${DB_PORT}
ports:
- "4242:3306"
volumes:
- ./db/data:/var/lib/mysql
networks:
- matcha-networks
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
start_period: 10s
restart: unless-stopped
adminer:
image: adminer
restart: always
ports:
- 8080:8080
environment:
ADMINER_DEFAULT_SERVER: mysql
ADMINER_DESIGN: pepa
networks:
- matcha-networks
depends_on:
db:
condition: service_healthy
networks:
matcha-networks:
driver: bridge
volumes:
db-data: