-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (47 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
48 lines (47 loc) · 1.15 KB
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
services:
django:
build:
context: ./
dockerfile: Dockerfile
container_name: password_django
command:
# python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/usr/src/api
ports:
- "8000:8000"
tty: true
depends_on:
- database
database:
build:
context: ./docker/mysql
dockerfile: Dockerfile
container_name: password_database
volumes:
- mysql:/var/lib/mysql
environment:
# this variable is mandatory. this is the root user password
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
# name of a database
MYSQL_DATABASE: mydb
# create new user
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
TZ: "Asia/Tokyo"
ports:
- "3306:3306"
nginx:
build:
context: ./docker/nginx
dockerfile: Dockerfile
volumes:
- ./docker/nginx/config/password-manager-api.rito-dev.com:/etc/letsencrypt/live/password-manager-api.rito-dev.com:ro
container_name: password_nginx
ports:
- "80:80"
- "443:443"
volumes:
mysql: