1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: slim down docker container (#1790)

* feat: slim down docker container

This changes the unleash-server node module to be as little as it can,
resulting in a much smaller docker container. From 383M -> 11M.
This commit is contained in:
Gard Rimestad 2022-07-05 16:08:06 +02:00 committed by GitHub
parent a3aff4421b
commit e2082b4493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View File

@ -5,3 +5,7 @@
!yarn.lock
!scripts
!tsconfig.json
!docs
!CHANGELOG.md
!LICENSE
!README.md

View File

@ -7,7 +7,7 @@ WORKDIR /unleash
COPY . /unleash
RUN yarn install --frozen-lockfile --ignore-scripts && yarn run build
RUN yarn install --frozen-lockfile --ignore-scripts && yarn run build && yarn run local:package
WORKDIR /unleash/docker

View File

@ -17,7 +17,7 @@
"@passport-next/passport-google-oauth2": "^1.0.0",
"basic-auth": "^2.0.1",
"passport": "^0.6.0",
"unleash-server": "file:./../"
"unleash-server": "file:./../build/"
},
"resolutions": {
"async": "^3.2.3",

View File

@ -2467,7 +2467,7 @@ unleash-frontend@4.14.0-beta.0:
resolved "https://registry.yarnpkg.com/unleash-frontend/-/unleash-frontend-4.14.0-beta.0.tgz#c68335f92f92494bdd25eb3aeb5f2dd9ce7950de"
integrity sha512-RIBkNR2S/uayMFwc88xlUwluYix6GH+7Cf1DqVV1fD/s0MMFQHQzL7qpE3XUmiUw5rn4BqXs95V1bmjh00+ACg==
"unleash-server@file:./..":
"unleash-server@file:../build":
version "4.14.0-beta.0"
dependencies:
"@unleash/express-openapi" "^0.2.0"

View File

@ -32,6 +32,7 @@
"copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/",
"db-migrate": "db-migrate --migrations-dir ./src/migrations",
"lint": "eslint ./src",
"local:package": "del-cli --force build && mkdir build && cp -r dist docs CHANGELOG.md LICENSE README.md package.json build",
"prebuild:watch": "yarn run clean",
"build:watch": "tsc -w",
"prebuild": "yarn run clean",