-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
54 lines (50 loc) · 1.26 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
51
52
53
54
version: "3.9"
services:
db:
build:
context: ./infra/docker/db
dockerfile: Dockerfile
container_name: "python-be-syokyu-db"
hostname: db
environment:
MYSQL_ROOT_PASSWORD: root_pass
MYSQL_DATABASE: python_be_syokyu
MYSQL_USER: dev
MYSQL_PASSWORD: dev
volumes:
- python-be-syokyu-db-data:/var/lib/mysql
- ./infra/docker/db/conf.d/my.cnf:/etc/mysql/conf.d/my.cnf
- ./infra/docker/db/initdb.d:/docker-entrypoint-initdb.d
ports:
- ${DOCKER_DB_PORT:-23306}:3306
tty: true
app:
container_name: "python-be-syokyu-app"
depends_on:
- db
build:
context: ./infra/docker/app
dockerfile: Dockerfile
target: ${APP_BUILD_TARGET:-dev}
environment:
DEBUG: true
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
ports:
- "${APP_PORT:-18008}:${APP_PORT:-18008}"
volumes:
- .:/opt/python-be-syokyu-app
command: fastapi dev main.py --port=${APP_PORT:-18008} --host=0.0.0.0
adminer:
image: adminer
restart: always
ports:
- 38080:8080
environment:
ADMINER_DEFAULT_SERVER: db
ADMINER_DESIGN: galkaev
volumes:
python-be-syokyu-db-data:
driver: local