2025-02-25 18:24:29 +01:00
|
|
|
# WSGI_FILE : file used as the app to run, passed to uwsgi --module option
|
|
|
|
|
# PORT : Port on which the app is exposed
|
|
|
|
|
# APP_DIR : Path of the app on the host machine. It will be mounted on /var/www/html in the container
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
|
|
# UWSGI Configuration
|
|
|
|
|
COPY configuration/ /etc/uwsgi/
|
|
|
|
|
RUN mkdir -p /etc/uwsgi ; \
|
2025-04-24 11:02:41 +00:00
|
|
|
adduser uwsgi -S -D -H -s /usr/sbin/nologin -u 33; \
|
2025-02-25 18:24:29 +01:00
|
|
|
apk add python3 python3-dev py3-pip gcc musl-dev linux-headers ; \
|
|
|
|
|
pip install --break-system-packages uwsgi django
|
|
|
|
|
|
|
|
|
|
# Application configuration
|
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
COPY ./app/ .
|
|
|
|
|
RUN pip install --break-system-packages -r requirements.txt
|
|
|
|
|
|
|
|
|
|
EXPOSE ${PORT}
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["uwsgi", "--ini", "/etc/uwsgi/uwsgi.ini"]
|