-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.test.yml
53 lines (50 loc) · 1.41 KB
/
docker-compose.test.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
# 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:
test_app:
build: ./
restart: always
environment:
DB_HOST: test_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: "false"
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 test"
depends_on:
- "test_db"
test_db:
build:
context: ./
dockerfile: Dockerfile.mysql
restart: always
volumes:
- test_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: test_agagd
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
volumes:
test_database: