This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
# Django
|
||||
DJANGO_SETTINGS_MODULE=website.settings
|
||||
DJANGO_SECRET_KEY=test_key
|
||||
DJANGO_SECRET_KEY=CWHZCAZBNV57tDkwGHJwTUu3PCSnGG45
|
||||
DEBUG=TRUE
|
||||
ALLOWED_HOSTS=localhost
|
||||
|
||||
# Database (PostgreSQL)
|
||||
POSTGRES_DB=test_db
|
||||
POSTGRES_USER=test_user
|
||||
POSTGRES_PASSWORD=test_password
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DBNAME=test_dbname # == POSTGRES_DB
|
||||
POSTGRES_DB=test_db
|
||||
|
||||
# Gunicorn
|
||||
GUNICORN_WORKERS=3
|
||||
|
||||
2
Makefile
2
Makefile
@@ -7,4 +7,4 @@ dev:
|
||||
docker compose -f ./compose.yaml -f ./compose.dev.yaml up --build
|
||||
|
||||
test:
|
||||
docker compose -f ./compose.yaml -f ./compose.test.yaml up --build
|
||||
docker compose -f ./compose.yaml -f ./compose.test.yaml up --build --abort-on-container-exit --exit-code-from web
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
services:
|
||||
web:
|
||||
env_file: .env.template
|
||||
env_file:
|
||||
- .env.template
|
||||
command: python -Wa manage.py test --noinput --parallel
|
||||
restart: "no"
|
||||
|
||||
db:
|
||||
env_file: .env.template
|
||||
env_file:
|
||||
- .env.template
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ WSGI_APPLICATION = "website.wsgi.application"
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.getenv("POSTGRES_NAME"),
|
||||
"DBNAME": os.getenv("POSTGRES_DBNAME"),
|
||||
"USER": os.getenv("POSTGRES_USER"),
|
||||
"PASSWORD": os.getenv("POSTGRES_PASSWORD"),
|
||||
"HOST": os.getenv("POSTGRES_HOST"),
|
||||
|
||||
Reference in New Issue
Block a user