docker: fix old dockerfiles being used, remove all gitlab references

This commit is contained in:
Jens Langhammer 2019-12-30 10:34:31 +01:00
parent f986dc89ad
commit 7b8e1bea92
6 changed files with 51 additions and 31 deletions

View file

@ -1,4 +1,26 @@
FROM beryju/passbook-base:latest
FROM python:3.7-slim-buster as locker
COPY ./Pipfile /app/
COPY ./Pipfile.lock /app/
WORKDIR /app/
RUN pip install pipenv && \
pipenv lock -r > requirements.txt && \
pipenv lock -rd > requirements-dev.txt
FROM python:3.7-slim-buster
COPY --from=locker /app/requirements.txt /app/
COPY --from=locker /app/requirements-dev.txt /app/
WORKDIR /app/
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
rm -rf /var/lib/apt/ && \
pip install -r requirements.txt --no-cache-dir && \
adduser --system --no-create-home --uid 1000 --group --home /app passbook
COPY ./passbook/ /app/passbook
COPY ./manage.py /app/

View file

@ -1,23 +0,0 @@
FROM python:3.7-slim-buster as locker
COPY ./Pipfile /app/
COPY ./Pipfile.lock /app/
WORKDIR /app/
RUN pip install pipenv && \
pipenv lock -r > requirements.txt && \
pipenv lock -rd > requirements-dev.txt
FROM python:3.7-slim-buster
COPY --from=locker /app/requirements.txt /app/
COPY --from=locker /app/requirements-dev.txt /app/
WORKDIR /app/
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
rm -rf /var/lib/apt/ && \
pip install -r requirements.txt --no-cache-dir && \
adduser --system --no-create-home --uid 1000 --group --home /app passbook

View file

@ -1,3 +0,0 @@
FROM beryju/passbook-base:latest
RUN pip install -r /app/requirements-dev.txt --no-cache-dir

View file

@ -9,7 +9,7 @@ This installation Method is for test-setups and small-scale productive setups.
## Install
Download the latest `docker-compose.yml` from [here](https://git.beryju.org/BeryJu.org/passbook/raw/master/docker-compose.yml). Place it in a directory of your choice.
Download the latest `docker-compose.yml` from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml). Place it in a directory of your choice.
passbook needs to know it's primary URL to create links in E-Mails and set cookies, so you have to run the following command:

View file

@ -21,7 +21,7 @@ nav:
- Sentry: integrations/services/sentry/index.md
repo_name: "BeryJu.org/passbook"
repo_url: https://git.beryju.org/BeryJu.org/passbook
repo_url: https://github.com/BeryJu/passbook
theme:
name: "material"
logo: "images/logo.svg"

View file

@ -1,12 +1,36 @@
FROM beryju/passbook-dev:latest as static-build
FROM python:3.7-slim-buster as locker
COPY ./Pipfile /app/
COPY ./Pipfile.lock /app/
WORKDIR /app/
RUN pip install pipenv && \
pipenv lock -r > requirements.txt && \
pipenv lock -rd > requirements-dev.txt
FROM python:3.7-slim-buster as static-build
COPY --from=locker /app/requirements.txt /app/
COPY --from=locker /app/requirements-dev.txt /app/
WORKDIR /app/
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
rm -rf /var/lib/apt/ && \
pip install -r requirements.txt --no-cache-dir && \
adduser --system --no-create-home --uid 1000 --group --home /app passbook
COPY ./passbook/ /app/passbook
COPY ./manage.py /app/
WORKDIR /app/
ENV PASSBOOK_POSTGRESQL__HOST=postgres
ENV PASSBOOK_REDIS__HOST=redis
ENV PASSBOOK_POSTGRESQL__USER=passbook
# CI Password, same as in .gitlab-ci.yml
# CI Password, same as in .github/workflows/ci.yml
ENV PASSBOOK_POSTGRESQL__PASSWORD="EK-5jnKfjrGRm<77"
RUN ./manage.py collectstatic --no-input