build: invert dockerignore

With the normal dockerignore it regularly happens that unwanted files end
up in the image. By denying everything and then allowing the desired files
we have a more verbose dockerignore, but the context is as small as possible.
This commit is contained in:
Julian Tölle 2023-04-02 21:59:41 +02:00
parent e4f775ca87
commit 9f171e5c75

View file

@ -1,7 +1,21 @@
node_modules/
dist/
# Ignore all and then selectivly allow
**/*
frontend/node_modules/
frontend/src/tailwind/tailwind.generated.css
# api
!package.json
!package-lock.json
!nest-cli.json
!tsconfig.build.json
!tsconfig.json
charts/
!src/**/*
# frontend
!frontend/.env.production
!frontend/package.json
!frontend/package-lock.json
!frontend/postcss.config.js
!frontend/tailwind.config.js
!frontend/tsconfig.json
!frontend/src/**/*
!frontend/public/**/*