Skip to content

Commit

Permalink
Move assets stage to production only image
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Sep 27, 2024
1 parent 1bc9398 commit b196bbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
name: Static Assets
services: ''
compose_file: docker-compose.yml
run: make test_static_assets
run: |
make compress_assets
make test_static_assets
-
name: Internal Routes
services: ''
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ COPY docker/etc/mime.types /etc/mime.types
COPY --chown=olympia:olympia . ${HOME}
# Copy compiled locales from builder
COPY --from=locales --chown=olympia:olympia ${HOME}/locale ${HOME}/locale
# Copy assets from assets
COPY --from=assets --chown=olympia:olympia ${HOME}/site-static ${HOME}/site-static
COPY --from=assets --chown=olympia:olympia ${HOME}/static-build ${HOME}/static-build

# Set shell back to sh until we can prove we can use bash at runtime
SHELL ["/bin/sh", "-c"]
Expand All @@ -190,5 +187,8 @@ FROM sources AS production

# Copy dependencies from `pip_production`
COPY --from=pip_production --chown=olympia:olympia /deps /deps
# Copy assets from assets
COPY --from=assets --chown=olympia:olympia ${HOME}/site-static ${HOME}/site-static
COPY --from=assets --chown=olympia:olympia ${HOME}/static-build ${HOME}/static-build


0 comments on commit b196bbe

Please sign in to comment.