Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OpenID Connect Configuration for Onboarding API
OIDC_ISSUER=
OIDC_CLIENT_ID=
OIDC_SCOPES=
OIDC_REDIRECT_URI=http://localhost:5173

POST_LOGIN_REDIRECT=http://localhost:5173


# Location of the API Backend
API_BACKEND_URL=


# Cookie Secret
# Replace this value with a strong, randomly generated string (at least 32 characters).
# Example for generation in Node.js: require('crypto').randomBytes(32).toString('hex')
COOKIE_SECRET=
24 changes: 18 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,26 @@ COPY package*.json ./
# Install dependencies
RUN npm ci

# Build
# Build
ENV NODE_ENV=production
COPY . .
RUN npm run build

# Use the latest LTS version of Nginx as the serving image
# https://hub.docker.com/_/nginx
FROM nginx:1.28.0-alpine-slim@sha256:39a9a15e0a81914a96fa9ffa980cdfe08e2e5e73ae3424f341ad1f470147c413
# The same image but now only install the production dependencies as the frontend is already built using vite in the build-stage
FROM node:22-alpine3.20@sha256:686b8892b69879ef5bfd6047589666933508f9a5451c67320df3070ba0e9807b AS production

COPY nginx.conf /etc/nginx/templates/default.conf.template
COPY --from=build-stage /usr/src/app/dist /usr/share/nginx/html
WORKDIR /usr/src/app

# copy over package.json from the origin file system again so it can be done in parallel from docker (if configured)
COPY package*.json ./
# install only dependencies which are not marked as dev
RUN npm ci --omit=dev

# copy over necessary files for the server
COPY server.js ./
COPY server server

# copy over precompiled frontend
COPY --from=build-stage /usr/src/app/dist dist

CMD ["npm", "run", "start"]
8 changes: 1 addition & 7 deletions frontend-config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"backendUrl": "http://localhost:3000",
"gatewayUrl": "http://localhost:3000",
"landscape": "LOCAL",
"documentationBaseUrl": "http://localhost:3000",
"oidcConfig": {
"clientId": "clientId",
"issuerUrl": "issuer-url",
"scopes": []
}
"documentationBaseUrl": "http://localhost:3000"
}
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="/src/mount.ts"></script>
</body>

</html>
</html>
Loading
Loading