forked from tusharneje-07/examhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
40 lines (38 loc) · 928 Bytes
/
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
---
services:
db:
container_name: mysql
image: "mysql:9.0.1"
env_file:
- .env
environment:
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
- db_data:/var/lib/mysql
- ./examhub.sql:/docker-entrypoint-initdb.d/examhub.sql # import default data
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 --silent"]
interval: 10s
timeout: 5s
retries: 5
restart: always
app:
container_name: examhub
image: "examhub-${TARGET}"
build:
context: .
target: ${TARGET}
env_file:
- .env
ports:
- 8000:8000
volumes: # comment / remove these
- .:/app # two lines if using in production
depends_on:
db:
condition: service_healthy
restart: always
volumes:
db_data: # Persistent MySQL storage