Skip to content

Commit

Permalink
fix: tweaks to docker config (#3651)
Browse files Browse the repository at this point in the history
* fix: tweaks to docker config

* fix: more descriptive SERVER_MODE
  • Loading branch information
rpcross authored Nov 9, 2023
1 parent 337373c commit d55b299
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version: '3.8'

services:
app:
environment:
- DJANGO_SETTINGS_MODULE=mlarchive.settings.settings_docker
build:
context: .
dockerfile: docker/app.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion docker/configs/docker_env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DJANGO SETTINGS
DEBUG=True
SERVER_MODE=development
SERVER_MODE=development-localauth
SECRET_KEY='j&-5nu4sa!dcg2gnkc8tr3($4$)6&i1(!$ju7v50+t-#6jyh7e'
DATABASES_NAME=mailarch
DATABASES_USER=django
Expand Down
5 changes: 5 additions & 0 deletions docker/configs/settings_docker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# settings/settings_rebuild.py
from .base import *

AUTHENTICATION_BACKENDS = ["django.contrib.auth.backends.ModelBackend"]

8 changes: 8 additions & 0 deletions docker/scripts/app-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ else
fi
fi

if [ ! -f "$WORKSPACEDIR/backend/mlarchive/settings/settings_docker.py" ]; then
echo "Setting up a default settings_docker.py ..."
else
echo "Renaming existing backend/mlarchive/settings/settings_docker.py to backend/mlarchive/settings/settings_docker.py.bak"
mv -f $WORKSPACEDIR/backend/mlarchive/settings/settings_docker.py $WORKSPACEDIR/backend/mlarchive/settings/settings_docker.py.bak
fi
cp $WORKSPACEDIR/docker/configs/settings_docker.py $WORKSPACEDIR/backend/mlarchive/settings/settings_docker.py

# Create data directories
echo "Creating data directories..."
for sub in \
Expand Down

0 comments on commit d55b299

Please sign in to comment.