Redefine base structure

This commit is contained in:
Roman Krček
2024-10-23 21:16:49 +02:00
parent c9a7535ef8
commit 7d345224c3
18 changed files with 228 additions and 3 deletions

View File

@@ -14,6 +14,6 @@ RUN --mount=type=cache,target=/tmp/pip_cache \
# Runtime stage for copying code and scripts
FROM base AS runtime
COPY --from=builder /usr/local/lib /usr/local/lib
COPY docker/entrypoint.sh ./
COPY docker/entrypoint.sh docker/uwsgi.ini ./
COPY orebolt_prevoid/ ./
ENTRYPOINT ["entrypoint.sh"]

View File

@@ -2,7 +2,7 @@
# Based on env variable PREVOID_RUN_MODE decide which service to start
if [ "$PREVOID_RUN_MODE" == "DJANGO" ]
python3 /app/manage.py runserver 0.0.0.0:8000
uwsgi --ini /app/uwsgi.ini
elif ["$PREVOID_RUN_MODE" == "CELERY"]
celery -A /app/orebolt_prevoid worker --loglevel=info

7
docker/uwsgi.ini Normal file
View File

@@ -0,0 +1,7 @@
[uwsgi]
chdir=/app/orebolt_prevoid
module=orebolt_prevoid.wsgi:application
master=True
pidfile=/tmp/orebolt_prevoid.pid
vacuum=True
max-requests=5000