-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
67 lines (63 loc) · 1.28 KB
/
docker-compose.yaml
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
---
version: '3'
services:
api:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: fastapi-tortoise-api-base-dev
volumes:
- ./.env:/usr/app/.env
depends_on:
database:
condition: service_healthy
ports:
- "8001:8000"
networks:
- api
- database
api-dev:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: fastapi-tortoise-api-base-dev
volumes:
- ./.env:/usr/app/.env
- ./pyproject.toml:/usr/app/pyproject.toml
- ./app:/usr/app/app
ports:
- "8001:8000"
networks:
- api
- database
database:
image: mariadb
container_name: database
restart: always
healthcheck:
test: ["CMD", "mysql" ,"--password=root", "--user=root", "--execute=SHOW DATABASES"]
interval: 15s
timeout: 20s
retries: 5
start_period: 15s
environment:
- MARIADB_ROOT_PASSWORD=root
- MARIADB_DATABASE=gobdo
- MARIADB_USER=gobdo_user
- MARIADB_PASSWORD=p@ssw0rd
networks:
- database
adminer:
image: adminer
restart: always
ports:
- 8080:8080
networks:
- database
networks:
api:
driver: bridge
database:
driver: bridge