-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 16b9c2c.
- Loading branch information
Showing
27 changed files
with
48 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,27 @@ | ||
FROM docker.io/node:22-alpine AS builder | ||
FROM docker.io/node:22 AS git | ||
|
||
RUN mkdir /app && chown -R node:node /app | ||
WORKDIR /app | ||
RUN apk add --no-cache git | ||
COPY .git ./.git | ||
|
||
RUN git config --global --add safe.directory /app \ | ||
&& echo "{\"sha\": \"$(git rev-parse HEAD)\", \"version\": \"$(git describe --tags --abbrev=0)\", \"commitDate\": \"$(git log -1 --format=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ')\", \"birthdate\": \"$(date +%Y-%m-%dT%H:%M:%SZ)\"}" > /app/serverversion | ||
|
||
COPY package.json package-lock.json tsconfig.json tsconfig.build.json nest-cli.json ./ | ||
COPY apps apps | ||
COPY config config | ||
COPY esbuild esbuild | ||
COPY src src | ||
|
||
RUN npm ci && npm run build | ||
|
||
COPY .git . | ||
RUN git config --global --add safe.directory /app && echo "{\"sha\": \"$(git rev-parse HEAD)\", \"version\": \"$(git describe --tags --abbrev=0)\", \"commitDate\": \"$(git log -1 --format=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ')\", \"birthdate\": \"$(date +%Y-%m-%dT%H:%M:%SZ)\"}" > /app/serverversion | ||
|
||
FROM docker.io/node:22-alpine | ||
|
||
ENV TZ=Europe/Berlin | ||
RUN apk add --no-cache git make python3 curl | ||
|
||
RUN apk add --no-cache git make python3 | ||
# to run ldap sync as script curl is needed | ||
RUN apk add --no-cache curl | ||
WORKDIR /schulcloud-server | ||
|
||
COPY package.json package-lock.json ./ | ||
COPY backup backup | ||
COPY config config | ||
COPY scripts/ldapSync.sh scripts/ | ||
COPY src src | ||
|
||
COPY --from=builder /app/dist dist | ||
COPY --from=builder /app/serverversion dist/apps/server/static-assets/serverversion | ||
|
||
# The postinstall script must be disabled, because esbuild is a dev dependency and not installed here. | ||
RUN npm pkg delete scripts.postinstall \ | ||
&& npm ci --omit=dev \ | ||
&& npm cache clean --force | ||
|
||
# The modules transpiled by esbuild need to be copied manually from the build stage. | ||
COPY --from=builder /app/node_modules/@keycloak/keycloak-admin-client-cjs node_modules/@keycloak/keycloak-admin-client-cjs | ||
COPY --from=builder /app/node_modules/file-type-cjs node_modules/file-type-cjs | ||
COPY tsconfig.json tsconfig.build.json package.json package-lock.json .eslintrc.js .eslintignore nest-cli.json ./ | ||
COPY esbuild ./esbuild | ||
RUN npm ci && npm cache clean --force | ||
COPY config /schulcloud-server/config | ||
COPY backup /schulcloud-server/backup | ||
COPY src /schulcloud-server/src | ||
COPY apps /schulcloud-server/apps | ||
COPY --from=git /app/serverversion /schulcloud-server/apps/server/static-assets | ||
COPY scripts/ldapSync.sh /schulcloud-server/scripts/ | ||
RUN npm run build | ||
|
||
ENV NODE_ENV=production | ||
ENV NO_COLOR="true" | ||
|
||
CMD npm start | ||
CMD npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
164 changes: 0 additions & 164 deletions
164
apps/server/src/modules/management/seed-data/factory/base.factory.ts
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
apps/server/src/modules/management/seed-data/factory/county.embeddable.factory.ts
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
apps/server/src/modules/management/seed-data/factory/federal-state.factory.ts
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
apps/server/src/modules/management/seed-data/factory/role.factory.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
apps/server/src/modules/management/seed-data/factory/school.entity.factory.ts
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
apps/server/src/modules/management/seed-data/factory/schoolyear.factory.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.