forked from usgo/agagd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic setup for running tests from within docker-compose.yml.
- Loading branch information
1 parent
5d9fb2e
commit 7d72267
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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 | ||
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: "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 | ||
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: test_agagd | ||
MYSQL_PASSWORD: "${MYSQL_PASSWORD}" | ||
|
||
volumes: | ||
database: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters