shuffle around Dockerfile to allow to work for background container

This commit is contained in:
burnettk 2023-01-31 16:14:22 -05:00
parent acf1cce024
commit 8a53c5103b
1 changed files with 10 additions and 7 deletions

View File

@ -7,6 +7,14 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /app
# base plus packages needed for deployment. Could just install these in final, but then we can't cache as much.
FROM base AS deployment
RUN apt-get update \
&& apt-get clean -y \
&& apt-get install -y -q curl git-core gunicorn3 default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
# Setup image for installing Python dependencies.
FROM base AS setup
@ -20,16 +28,11 @@ COPY . /app
RUN poetry install --without dev
# Final image without setup dependencies.
FROM base AS final
FROM deployment AS final
LABEL source="https://github.com/sartography/spiff-arena"
LABEL description="Software development platform for building, running, and monitoring executable diagrams"
RUN apt-get update \
&& apt-get clean -y \
&& apt-get install -y -q curl git-core gunicorn3 default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
COPY --from=setup /app /app
ENTRYPOINT ["./bin/boot_server_in_docker"]
CMD ["./bin/boot_server_in_docker"]