-
Roman Brendler authored
- When using the docker setup, the image now expects to get all config variables as environment variables
Roman Brendler authored- When using the docker setup, the image now expects to get all config variables as environment variables
Dockerfile 753 B
FROM python:3.8-slim
LABEL maintainer="David Trattnig <david.trattnig@subsquare.at>"
# Initialize the project structure
RUN mkdir -p /srv
RUN mkdir -p /var/log/aura
# Copy sources and install
COPY . /srv
WORKDIR /srv
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --no-cache-dir -r contrib/postgresql-requirements.txt
ENV PYTHONPATH "${PYTHONPATH}:/srv/src"
# Create default config
COPY ./config/sample/gunicorn/sample-docker.gunicorn.conf.py /srv/config/gunicorn.conf.py
COPY ./config/sample/sample-docker.engine-api.ini /srv/config/engine-api.ini
# Start the API Server
EXPOSE 8008
ENTRYPOINT ["gunicorn"]
CMD ["-c", "/srv/config/gunicorn.conf.py", "src.app:app"]