-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
40 lines (39 loc) · 906 Bytes
/
docker-compose.yaml
File metadata and controls
40 lines (39 loc) · 906 Bytes
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
version: "3.9"
services:
app:
container_name: task_hub_app
build:
context: .
image: goodwin954/task_hub
ports:
- "8000:8000"
depends_on:
mysql:
condition: service_healthy
networks:
- my_network
command: uvicorn run:app --host 0.0.0.0 --port 8000
mysql:
container_name: task_hub_mysql
image: mysql:latest
environment:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: task_hub
MYSQL_PORT: 3306
MYSQL_ROOT_PASSWORD: root_password
ports:
- "3306:3306"
volumes:
- ./mysql_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h mysql -u user -p $MYSQL_PASSWORD" ]
interval: 5s
timeout: 15s
retries: 20
networks:
- my_network
networks:
my_network:
driver: bridge