Skip to content

Commit

Permalink
Project update
Browse files Browse the repository at this point in the history
  • Loading branch information
ysavary committed Dec 27, 2021
1 parent 9d045f0 commit b435ab1
Show file tree
Hide file tree
Showing 20 changed files with 888 additions and 465 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
winds_mobi_admin/local_settings.py
.git
volumes
.env*
static
35 changes: 24 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
FROM python:3.7-slim-stretch
FROM python:3.9.9-slim-bullseye AS base

RUN apt-get update; \
apt-get --yes --no-install-recommends install build-essential libpq-dev; \
rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

ADD . /app
WORKDIR /app
RUN apt update; \
apt --yes --no-install-recommends install libpq5

RUN pip install pipenv
RUN pipenv install --system --deploy
FROM base AS python

RUN apt update; \
apt --yes --no-install-recommends install build-essential libpq-dev
RUN pip install poetry

COPY . .
RUN POETRY_VIRTUALENVS_IN_PROJECT=true poetry install --no-dev

FROM base AS runtime

ENV PATH="/.venv/bin:$PATH"

COPY . .

FROM runtime AS production

COPY --from=python /.venv /.venv

ENV STATIC_ROOT /static/
RUN python manage.py collectstatic

RUN apt-get --yes --purge autoremove build-essential

CMD ["/app/docker-cmd.sh"]
CMD ["/docker-cmd.sh"]
25 changes: 0 additions & 25 deletions Pipfile

This file was deleted.

296 changes: 0 additions & 296 deletions Pipfile.lock

This file was deleted.

19 changes: 0 additions & 19 deletions docker-compose.postgres.yml

This file was deleted.

Loading

0 comments on commit b435ab1

Please sign in to comment.