Skip to content

Commit

Permalink
adapt Dockerfile to new configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Dec 9, 2020
1 parent 7458ae8 commit f261125
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update && \

# add requirements file
WORKDIR /app/src
COPY requirements.txt /app/src/requirements.txt
COPY imagetagger/requirements.txt /app/src/requirements.txt

# install python dependencies
RUN pip3 install -r /app/src/requirements.txt
Expand All @@ -22,10 +22,12 @@ RUN apt-get clean
# add remaining sources
COPY imagetagger /app/src/imagetagger

# confiure runtime environment
RUN mkdir /app/data /app/static /app/config
RUN cp /app/src/imagetagger/imagetagger/settings.py.example /app/config/settings.py
RUN ln -sf /app/config/settings.py /app/src/imagetagger/imagetagger/settings.py
# configure /app/config/imagetagger_settings to be python importable so that one can use their own settings file
RUN mkdir -p /app/data /app/static /app/config/imagetagger_settings
RUN touch /app/config/imagetagger_settings/__init__.py
ENV PYTHONPATH=$PYTHONPATH:/app/config:/app/src/imagetagger

# configure runtime environment
RUN sed -i 's/env python/env python3/g' /app/src/imagetagger/manage.py

ARG UID_WWW_DATA=5008
Expand All @@ -41,6 +43,7 @@ COPY docker/update_points docker/zip_daemon docker/run /app/bin/
RUN ln -sf /app/bin/* /usr/local/bin
ENTRYPOINT ["/usr/local/bin/run"]
ENV IN_DOCKER=true
ENV DJANGO_CONFIGURATION=Prod

# add image metadata
EXPOSE 3008
Expand Down

0 comments on commit f261125

Please sign in to comment.