-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (48 loc) · 1.04 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
version: "3"
services:
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
expose:
- "${DB_PORT}"
volumes:
- twitter-db:/twitter-db
healthcheck:
test:
[
"CMD",
"/usr/bin/mysql",
"--user=${DB_USER}",
"--password=${DB_PASSWORD}",
"--execute",
"SHOW DATABASES;",
]
interval: 2s
start_period: 10h
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "${VITE_SERVER_PORT}:${VITE_SERVER_PORT}"
depends_on:
mysql:
condition: service_healthy
volumes:
- twitter-db:/twitter-db
healthcheck:
test:
["CMD", "curl", "http://${VITE_SERVER_HOSTNAME}:${VITE_SERVER_PORT}"]
interval: 2s
start_period: 10h
frontend:
build: .
ports:
- "${VITE_CLIENT_PORT_PROD}:${VITE_CLIENT_PORT_PROD}"
depends_on:
backend:
condition: service_healthy
volumes:
twitter-db: