Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up build #1650

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ RUN groupadd -g "${GID}" -r web \
# Copy only requirements, to cache them in docker layer
COPY --chown=web:web ./poetry.lock ./pyproject.toml /code/

COPY --chown=web:web ./namex /code/namex
COPY --chown=web:web ./README.md /code

# Project initialization:
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
Expand All @@ -93,9 +90,8 @@ RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
# Running as non-root user:
USER web

# The following stage is only for production:
# FROM development_build AS production_build
COPY --chown=web:web . /code
COPY --chown=web:web ./namex /code/namex
COPY --chown=web:web ./README.md /code

# Run the server
ENV PYTHONPATH=/code
Expand Down
10 changes: 2 additions & 8 deletions services/emailer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ RUN groupadd -g "${GID}" -r web \
# Copy only requirements, to cache them in docker layer
COPY --chown=web:web ./poetry.lock ./pyproject.toml /code/

COPY --chown=web:web ./src /code/src
COPY --chown=web:web ./README.md /code

# Project initialization:
RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
echo "$APP_ENV" \
Expand All @@ -80,10 +77,7 @@ RUN --mount=type=cache,target="$POETRY_CACHE_DIR" \
# Running as non-root user:
USER web

# The following stage is only for production:
# FROM development_build AS production_build
COPY --chown=web:web . /code

# ENV PYTHONPATH=/opt/app-root/src
COPY --chown=web:web ./src /code/src
COPY --chown=web:web ./README.md /code

CMD gunicorn --preload --bind 0.0.0.0:${PORT} --config /code/gunicorn_config.py wsgi:app