Some changes for convinience

This commit is contained in:
Patrick Jentsch 2020-06-08 10:14:15 +02:00
parent 056fbe273c
commit 023aade995
7 changed files with 16 additions and 20 deletions

3
daemon/.dockerignore Normal file
View File

@ -0,0 +1,3 @@
Dockerfile
.dockerignore
*.bak

View File

@ -4,7 +4,7 @@ FROM python:3.6-slim-stretch
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de" LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
ARG docker_gid=998 ARG docker_gid=999
ARG gid=1000 ARG gid=1000
ARG uid=1000 ARG uid=1000
ENV LANG=C.UTF-8 ENV LANG=C.UTF-8
@ -25,16 +25,10 @@ USER nopaqued
WORKDIR /home/nopaqued WORKDIR /home/nopaqued
COPY ["logger", "logger"] COPY --chown=nopaqued:nopaqued [".", "."]
COPY ["notify", "notify"]
COPY ["tasks", "tasks"]
COPY ["decorators.py", "nopaqued.py", "requirements.txt", "./"]
RUN python -m venv venv \ RUN python -m venv venv \
&& venv/bin/pip install --requirement requirements.txt \ && venv/bin/pip install --requirement requirements.txt \
&& mkdir logs && mkdir logs
COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["./docker-entrypoint.sh"]
ENTRYPOINT ["docker-entrypoint.sh"]

View File

@ -5,4 +5,5 @@ wait-for-it db:5432 --strict --timeout=0
echo "Waiting for web..." echo "Waiting for web..."
wait-for-it web:5000 --strict --timeout=0 wait-for-it web:5000 --strict --timeout=0
venv/bin/python nopaqued.py source venv/bin/activate
python nopaqued.py

View File

@ -51,7 +51,7 @@ services:
- "./web/migrations:/home/nopaque/migrations" - "./web/migrations:/home/nopaque/migrations"
- "./web/tests:/home/nopaque/tests" - "./web/tests:/home/nopaque/tests"
- "./web/config.py:/home/nopaque/config.py" - "./web/config.py:/home/nopaque/config.py"
- "./web/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh" - "./web/docker-entrypoint.sh:/home/nopaque/docker-entrypoint.sh"
- "./web/nopaque.py:/home/nopaque/nopaque.py" - "./web/nopaque.py:/home/nopaque/nopaque.py"
- "./web/requirements.txt:/home/nopaque/requirements.txt" - "./web/requirements.txt:/home/nopaque/requirements.txt"
daemon: daemon:
@ -72,8 +72,9 @@ services:
- "./logs:/home/nopaqued/logs" - "./logs:/home/nopaqued/logs"
- "./daemon/logger:/home/nopaqued/logger" - "./daemon/logger:/home/nopaqued/logger"
- "./daemon/notify:/home/nopaqued/notify" - "./daemon/notify:/home/nopaqued/notify"
- "./daemon/tasks:/home/nopaqued/tasks"
- "./daemon/decorators.py:/home/nopaqued/decorators.py" - "./daemon/decorators.py:/home/nopaqued/decorators.py"
- "./daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh" - "./daemon/docker-entrypoint.sh:/home/nopaqued/docker-entrypoint.sh"
- "./daemon/nopaqued.py:/home/nopaqued/nopaqued.py" - "./daemon/nopaqued.py:/home/nopaqued/nopaqued.py"
- "./daemon/requirements.txt:/home/nopaqued/requirements.txt" - "./daemon/requirements.txt:/home/nopaqued/requirements.txt"
db: db:

3
web/.dockerignore Normal file
View File

@ -0,0 +1,3 @@
Dockerfile
.dockerignore
*.bak

View File

@ -27,16 +27,10 @@ USER nopaque
WORKDIR /home/nopaque WORKDIR /home/nopaque
COPY ["app", "app"] COPY --chown=nopaque:nopaque [".", "."]
COPY ["migrations", "migrations"]
COPY ["tests", "tests"]
COPY ["config.py", "nopaque.py", "requirements.txt", "./"]
RUN python -m venv venv \ RUN python -m venv venv \
&& venv/bin/pip install --requirement requirements.txt \ && venv/bin/pip install --requirement requirements.txt \
&& mkdir logs && mkdir logs
COPY ["docker-entrypoint.sh", "/usr/local/bin/"] ENTRYPOINT ["./docker-entrypoint.sh"]
ENTRYPOINT ["docker-entrypoint.sh"]