Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Only allow precompiled assets to be injected when running from CI

Cyril Rohrf99b9e7a5175
diff --git a/.dockerignore b/.dockerignore
index 9a5efd58414..bca449c8d7c 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -33,6 +33,3 @@ frontend/node_modules
node_modules
# travis
vendor/bundle
-# allow precompiled assets to be injected
-!/public/assets
-!/config/frontend_assets.manifest.json
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8f586644447..b0a0d0f7d91 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -83,6 +83,7 @@ jobs:
- name: Precompile assets
run: |
./docker/prod/setup/precompile-assets.sh
+ # public/assets will be saved as artifact, so temporarily copying config file there as well
cp config/frontend_assets.manifest.json public/assets/frontend_assets.manifest.json
- uses: actions/upload-artifact@v3
with:
@@ -142,6 +143,10 @@ jobs:
ls -al public/
mv public/assets/frontend_assets.manifest.json config/frontend_assets.manifest.json
ls -al config/frontend_assets.manifest.json
+ # allow precompiled assets to be injected into docker image
+ echo '' >> .dockerignore
+ echo '!/public/assets' >> .dockerignore
+ echo '!/config/frontend_assets.manifest.json' >> .dockerignore
- name: Add build information
run: |
echo "${{ needs.setup.outputs.checkout_ref }}" > PRODUCT_VERSION