-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.yml
55 lines (52 loc) · 1.42 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
55
# docker-compose setup for a development environment.
# To use this file, populate config-docker.env with the following:
#
# MYSQL_PASSWORD - a password for the mysql user
# MYSQL_ROOT_PASSWORD - a password for the mysql *root* user
#
# Then you can run:
# - docker-compose build
# - docker-compose up
version: '3.5'
services:
app:
build: ./
restart: always
ports:
- "8000:8000"
environment:
DB_HOST: db
DB_PORT: 3306
APP_DB_NAME: agagd
AGAGD_USER: agagd
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
SECRET_KEY: insecure-key-for-testing
DEBUG: "true"
LOAD_FIXTURES: "true"
volumes:
- ./agagd/agagd:/srv/agagd
- ./agagd/agagd_core:/srv/agagd_core
- ./agagd/media:/srv/media
- ./agagd/static:/srv/static
- ./agagd/jinja2:/srv/jinja2
- ./agagd/templates:/srv/templates
command: "python manage.py runserver 0.0.0.0:8000"
depends_on:
- "db"
db:
build:
context: ./
dockerfile: Dockerfile.mysql
restart: always
volumes:
- database:/var/lib/mysql
environment:
# This is safer than it looks, since without a 'ports' section, docker-compose
# isolates this app to a network local to this compose file.
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_USER: agagd
MYSQL_DATABASE: agagd
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
volumes:
database: