Skip to content

Commit

Permalink
change Dockerfile to be easier 3rd-party configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Dec 10, 2020
1 parent f261125 commit a2670bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ RUN apt-get clean
# add remaining sources
COPY imagetagger /app/src/imagetagger

# 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 imagetagger.settings_local to be importable but 3rd party providable
RUN mkdir -p /app/data /app/static /app/config/
RUN touch /app/config/settings.py
RUN ln -sf /app/config/settings.py /app/src/imagetagger/settings_local.py

# configure runtime environment
RUN sed -i 's/env python/env python3/g' /app/src/imagetagger/manage.py
Expand All @@ -44,6 +44,7 @@ RUN ln -sf /app/bin/* /usr/local/bin
ENTRYPOINT ["/usr/local/bin/run"]
ENV IN_DOCKER=true
ENV DJANGO_CONFIGURATION=Prod
ENV IT_FS_URL=/app/data

# add image metadata
EXPOSE 3008
Expand Down

0 comments on commit a2670bb

Please sign in to comment.