Make environment ready for Docker

This commit is contained in:
2022-07-29 09:51:19 +01:00
parent 362ad579d5
commit dc9f30affe
4 changed files with 30 additions and 3 deletions

18
docker/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1
FROM python:3
RUN useradd -d /code pathogen
RUN mkdir /code
RUN chown pathogen:pathogen /code
RUN mkdir /venv
RUN chown pathogen:pathogen /venv
USER pathogen
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.prod.txt /code/
RUN python -m venv /venv
RUN . /venv/bin/activate && pip install -r requirements.prod.txt
CMD . /venv/bin/activate && exec python manage.py runserver 0.0.0.0:8000

View File

@@ -0,0 +1,17 @@
version: "2"
services:
app:
image: pathogen/neptune
build: ./docker
volumes:
- ${PORTAINER_GIT_DIR}:/code
ports:
- "${NEPTUNE_PORT}:8000"
env_file:
- ../stack.env
networks:
default:
external:
name: pathogen

View File

@@ -0,0 +1,8 @@
wheel
django
django-crispy-forms
crispy-bulma
opensearch-py
stripe
django-rest-framework
numpy