Skip to content

Commit

Permalink
db is created and copied to container
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Sep 13, 2024
1 parent 378d24c commit 00d0641
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# syntax=docker/dockerfile:1
FROM python:3.7-slim-bullseye
ENV VIRTUAL_ENV="/app"
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin${PATH:+:}$PATH"
COPY . $VIRTUAL_ENV/reps/djaodjin-deployutils/
WORKDIR $VIRTUAL_ENV/reps/djaodjin-deployutils
RUN set -eux;\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends make; \
\
pip install -r testsite/requirements.txt; \
\
make initdb; \
\
apt-mark auto '.*'; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*;

RUN python -m venv /app
COPY . /app/reps/djaodjin-deployutils
WORKDIR /app/reps/djaodjin-deployutils
RUN /app/bin/pip install -r testsite/requirements.txt

EXPOSE 80/tcp
ENTRYPOINT ["/app/bin/python", "/app/reps/djaodjin-deployutils/manage.py", "runserver", "0.0.0.0:80"]

0 comments on commit 00d0641

Please sign in to comment.