wg-manager/Containerfile

15 lines
No EOL
508 B
Docker

FROM docker.io/python:slim
RUN bash -c 'mkdir /app;\
python -m venv /venv'
COPY static /app/static
COPY templates /app/templates
COPY wg_manager /app/wg_manager
COPY wg_connection_manager /app/wg_connection_manager
COPY requirements.txt .env manage.py /app/
WORKDIR /app
RUN bash -c '/venv/bin/pip install -r requirements.txt; \
/venv/bin/python manage.py migrate ; \
/venv/bin/python manage.py collectstatic --noinput'
EXPOSE 4000
CMD ["/venv/bin/gunicorn","wg_manager.wsgi","-b0.0.0.0:4000"]