From df1336801459010d52826f9a8d5883779910dbf1 Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Tue, 11 Apr 2023 10:45:28 -0400 Subject: [PATCH] Unify admin and public docker images --- api/Dockerfile | 2 +- api/Dockerfile.public | 20 -------------------- docker-compose.yml | 4 +++- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 api/Dockerfile.public diff --git a/api/Dockerfile b/api/Dockerfile index 351757b46..8c5bd8de8 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -17,4 +17,4 @@ USER app RUN poetry install --only main -CMD ["/app/docker.d/init.sh", "admin"] +ENTRYPOINT ["/bin/bash", "/app/docker.d/init.sh"] diff --git a/api/Dockerfile.public b/api/Dockerfile.public deleted file mode 100644 index 1d4fa25e1..000000000 --- a/api/Dockerfile.public +++ /dev/null @@ -1,20 +0,0 @@ -# WARNING: Update taskcluster/docker/k8s-image/Dockerfile file when you update -# this one. Or better, find a way to use the same Dockerfile -FROM python:3.9 - -RUN groupadd --gid 10001 app && \ - useradd -g app --uid 10001 --shell /usr/sbin/nologin --create-home --home-dir /app app - -WORKDIR /app - -COPY requirements/poetry.txt /tmp/poetry.txt -RUN pip install -r /tmp/poetry.txt - -COPY . /app - -ENV WEB_CONCURRENCY=3 -USER app - -RUN poetry install --only main - -CMD ["/app/docker.d/init.sh", "public"] diff --git a/docker-compose.yml b/docker-compose.yml index f5c2bca90..01e0f3b0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ services: build: context: api dockerfile: Dockerfile + command: admin ports: - "8015:8015" # Mounting these three specific volumes is done to ensure that autoreloading @@ -45,7 +46,8 @@ services: public: build: context: api - dockerfile: Dockerfile.public + dockerfile: Dockerfile + command: public ports: - "8016:8016" # See comment on the api container for the reasoning behind these mounts