Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDBF-426: Feedback-plugin-backend: Docker compose example using the p… #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PYTHON_VERSION=3.9
NGINX_VERSION=latest
MARIADB_VERSION=10.6
MARIADB_ROOT_PASSWORD=1234
MARIADB_MYSQL_LOCALHOST_USER=1

# For development purposes, the database data directory and configuration file
# are passed from the repository. In production these should be set to where you
Expand All @@ -19,7 +20,7 @@ MARIADB_CONFDIR=./mariadb/confdir
# for your deployed server.
DJANGO_ALLOWED_HOSTS=*
# This key needs to be set to something proper one in a production deployment.
DJANGO_SECRET_KEY='123'
DJANGO_SECRET_KEY=123
# Any non empty string enables Debug mode for Django
DJANGO_DEBUG=True

Expand All @@ -28,9 +29,9 @@ DJANGO_DEBUG=True
# as well as the user name exists.
#
# There will also be a test_{DJANGO_DB_NAME} database used for running tests.
DJANGO_DB_NAME='feedback_plugin'
DJANGO_DB_USER_NAME='feedback'
DJANGO_DB_USER_PASSWORD='A;p4rqgDt-Mf7L{z'
DJANGO_DB_NAME=feedback_plugin
DJANGO_DB_USER_NAME=feedback
DJANGO_DB_USER_PASSWORD=A;p4rqgDt-Mf7L{z

# Control logging level for Django.
DJANGO_LOG_LEVEL='ERROR'
DJANGO_LOG_LEVEL=ERROR
12 changes: 9 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '2.1'
services:
db:
build:
Expand All @@ -13,6 +13,12 @@ services:
- DJANGO_DB_NAME
- DJANGO_DB_USER_NAME
- DJANGO_DB_USER_PASSWORD
- MARIADB_MYSQL_LOCALHOST_USER
healthcheck:
test: /usr/local/bin/healthcheck.sh --su=mysql --connect --innodb_initialized
interval: 3s
timeout: 2s
retries: 3
volumes:
- ${MARIADB_DATADIR}:/var/lib/mysql
- ${MARIADB_CONFDIR}:/etc/mysql/mariadb.conf.d
Expand Down Expand Up @@ -40,8 +46,8 @@ services:
- static_volume:/app/src/staticfiles
- ../src/:/app/src/
depends_on:
- db

db:
condition: service_healthy
nginx:
build:
context: ./nginx
Expand Down