Skip to content

Commit

Permalink
💚 fixing docker environment variables, and rebuild conditions (#674)
Browse files Browse the repository at this point in the history
`RUN export env=val` in docker doesn't persist the environment variable
for following `RUN` commands.

Also the `publish_feature.yml` didn't trigger when modifying the
relevant `Dockerfile`s
  • Loading branch information
ericlinagora authored Sep 30, 2024
2 parents d21adc7 + 6593972 commit 5bc7219
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/publish_feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ jobs:
filters: |
backend:
- "tdrive/backend/node/**"
- "tdrive/docker/tdrive-node/Dockerfile"
frontend:
- "tdrive/frontend/**"
- "tdrive/docker/tdrive-frontend/**"
onlyoffice-connector:
- "tdrive/connectors/onlyoffice-connector/**"
- "tdrive/docker/onlyoffice-connector/Dockerfile"
ldap-sync:
- "tdrive/backend/utils/ldap-sync/**"
- "tdrive/docker/tdrive-ldap-sync/Dockerfile"
nextcloud-migration:
- "tdrive/backend/utils/nextcloud-migration/**"
- "tdrive/docker/tdrive-nextcloud-migration/Dockerfile"
publish-feature:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions tdrive/docker/tdrive-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ FROM node-base AS installed-libs

COPY backend/node/ .
#Install dev dependancies for build
RUN export NODE_ENV=development
ENV NODE_ENV=development
RUN npm ci

#Build in production mode
RUN export NODE_ENV=production
ENV NODE_ENV=production
RUN npm run build
RUN rm -rf node_modules
#Install prod dependancies after build
Expand Down

0 comments on commit 5bc7219

Please sign in to comment.