Skip to content

Commit d04a2bd

Browse files
committed
🔧 Enable mounting on subpath
1 parent 98714c0 commit d04a2bd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bin/docker_start.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ uwsgi_port=${UWSGI_PORT:-8000}
1313
uwsgi_processes=${UWSGI_PROCESSES:-4}
1414
uwsgi_threads=${UWSGI_THREADS:-1}
1515

16+
mountpoint=${SUBPATH:-/}
17+
1618
until pg_isready; do
1719
>&2 echo "Waiting for database connection..."
1820
sleep 1
@@ -26,10 +28,11 @@ python src/manage.py migrate
2628

2729
# Start server
2830
>&2 echo "Starting server"
29-
exec uwsgi \
31+
uwsgi \
3032
--http :$uwsgi_port \
3133
--http-keepalive \
32-
--module openklant.wsgi \
34+
--manage-script-name \
35+
--mount $mountpoint=openklant.wsgi:application \
3336
--static-map /static=/app/static \
3437
--static-map /media=/app/media \
3538
--chdir src \

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ services:
2626
- ALLOWED_HOSTS=*
2727
- CACHE_DEFAULT=redis:6379/0
2828
- CACHE_AXES=redis:6379/0
29-
- SECRET_KEY=${SECRET_KEY:-django-insecure-$8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
29+
- SUBPATH=${SUBPATH:-/}
30+
- SECRET_KEY=${SECRET_KEY:-django-insecure-f8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
3031
- CELERY_BROKER_URL=redis://redis:6379/0
3132
- CELERY_RESULT_BACKEND=redis://redis:6379/0
3233
- NOTIFICATIONS_DISABLED=True

0 commit comments

Comments
 (0)