-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.dev.yml
41 lines (41 loc) · 1.23 KB
/
docker-compose.dev.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
# 개발 서버 환경에서의 Docker [docker-compose]
version: "3.9"
services:
webapp:
build:
context: .
dockerfile: ${APP_DOCKFILE}
environment:
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DB_HOST=db
- DB_PORT=${MYSQL_PORT}
- DB_DATABASE=${MYSQL_DATABASE}
- DB_USER=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
ports:
- ${APP_PORT_EXTERNAL}:${APP_PORT}
depends_on:
- db
#volumes:
# - webapp_data:/app/web
restart: always
# command: python manage.py runserver 0.0.0.0:8000
entrypoint: /bin/bash ./docker-entrypoint.sh
db:
image: mysql:${MYSQL_IMAGE_VER}
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci
ports:
- ${MYSQL_PORT_EXTERNAL}:${MYSQL_PORT}
volumes:
- maindb:/var/lib/mysql
restart: always
volumes:
maindb: