From 134ac58efa33649c2cdf5234c6e76ea6d0186d44 Mon Sep 17 00:00:00 2001 From: Anonymo Date: Wed, 10 Jan 2024 12:16:41 +1100 Subject: [PATCH] Move primary Dockerfile to src/ for clarity --- Makefile | 2 +- Dockerfile => src/Dockerfile | 9 ++++----- src/docker-entrypoint.sh | 2 ++ requirements.txt => src/requirements.txt | 0 4 files changed, 7 insertions(+), 6 deletions(-) rename Dockerfile => src/Dockerfile (90%) rename requirements.txt => src/requirements.txt (100%) diff --git a/Makefile b/Makefile index 7ad5b63..5ff4d1f 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ build: --no-cache \ -t $(DOCKER_IMAGE_FULL) \ -t $(DOCKER_IMAGE_LATEST) \ - . + ./src run: DOCKER_IMAGE=$(DOCKER_IMAGE_FULL) \ diff --git a/Dockerfile b/src/Dockerfile similarity index 90% rename from Dockerfile rename to src/Dockerfile index 174350b..e10085d 100644 --- a/Dockerfile +++ b/src/Dockerfile @@ -7,15 +7,14 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini ENTRYPOINT ["/tini", "--"] -# install app dependencies -COPY requirements.txt ./ -RUN pip install -r requirements.txt --no-cache-dir - # add app -COPY src /src +COPY . /src # set working directory WORKDIR /src +# install app dependencies +RUN pip install -r requirements.txt --no-cache-dir + CMD ["./docker-entrypoint.sh"] diff --git a/src/docker-entrypoint.sh b/src/docker-entrypoint.sh index e954509..186e634 100755 --- a/src/docker-entrypoint.sh +++ b/src/docker-entrypoint.sh @@ -1,3 +1,5 @@ +#!/bin/bash + if [ -n "${INIT_RECIPES_CSV}" ]; then echo "Initialising database with ${INIT_RECIPES_CSV}." diff --git a/requirements.txt b/src/requirements.txt similarity index 100% rename from requirements.txt rename to src/requirements.txt