wikimore/entrypoint.sh
Kumi a2f8284c55
feat: Refactors Docker setup to improve security and efficiency
Switches base image from Python to Alpine for a slimmer image and improved startup efficiency.

Uses a virtual environment for Python dependencies and adds a dedicated user for the application, enhancing security and environment isolation.

Introduces a new entrypoint script for better configuration of uWSGI server and updates Docker compose setup to include security options and resource limits. Removes old compose file in favor of a more secure configuration example.
2025-01-31 09:22:29 +01:00

18 lines
300 B
Bash

#!/bin/sh
args="--plugin python3 \
--http-socket 0.0.0.0:$PORT \
--master \
--module wikimore.app:app \
-H /opt/venv"
if [ "$UWSGI_PROCESSES" ]
then
args="$args --processes $UWSGI_PROCESSES"
fi
if [ "$UWSGI_THREADS" ]
then
args="$args --threads $UWSGI_THREADS"
fi
exec /usr/sbin/uwsgi $args