Skip to content

Commit 20bab42

Browse files
committed
Added: Config Loader
1 parent c68841d commit 20bab42

17 files changed

+80
-31
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.github
22
.idea
33
.gitignore
4+
dist
5+
node_modules

.env

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
STANDALONE_SINGLE_SPA=false
2-
VUE_APP_KEYCLOAK_URL=https://login.verbis.dkfz.de/
3-
VUE_APP_KEYCLOAK_REALM=test-realm-01
4-
VUE_APP_KEYCLOAK_CLIENT_ID=bridgehead-test
5-
VUE_APP_KEYCLOAK_REFRESH_TOKEN_TIME_IN_MINUTES=5
6-
VUE_APP_PROJECT_MANAGER_BACKEND_URL=http://localhost:8097
7-
VUE_APP_PUBLIC_PATH=/

.env.standalone

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
STANDALONE_SINGLE_SPA=true
2-
VUE_APP_KEYCLOAK_URL=https://login.verbis.dkfz.de/
3-
VUE_APP_KEYCLOAK_REALM=test-realm-01
4-
VUE_APP_KEYCLOAK_CLIENT_ID=bridgehead-test
5-
VUE_APP_KEYCLOAK_REFRESH_TOKEN_TIME_IN_MINUTES=5
6-
VUE_APP_PROJECT_MANAGER_BACKEND_URL=http://localhost:8097
7-
VUE_APP_PUBLIC_PATH=/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6464
- Github CI
6565
- VUE_APP_PUBLIC_PATH
6666
- Nginx conf
67+
- Config Loader

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,31 @@ RUN npm install
99

1010
# Copy the rest of your application code
1111
COPY . .
12+
COPY docker/.env.template ./.env
13+
COPY docker/.env.standalone.template ./.env.standalone
1214

1315
# Build the Vue application
1416
RUN npm run build:standalone
1517

1618
# Stage 2: Serve the application with Nginx
1719
FROM nginx:alpine
1820

21+
WORKDIR /usr/share/nginx/html
22+
1923
# Copy the built Vue application from the previous stage
20-
COPY --from=build /app/dist /usr/share/nginx/html
24+
COPY --from=build /app/dist .
2125

2226
# Copy custom Nginx configuration if needed
23-
COPY nginx.conf /etc/nginx/conf.d/default.conf
27+
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
2428

2529
# Expose port 80 for the Nginx server
2630
EXPOSE 80
2731

28-
# Nginx will run automatically
29-
CMD ["nginx", "-g", "daemon off;"]
32+
ADD docker/start.sh /samply/
33+
RUN chmod +x /samply/start.sh
34+
35+
COPY docker/keycloak.json .
36+
COPY docker/config.json .
37+
38+
39+
CMD ["/samply/start.sh"]

docker/.env.standalone.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
STANDALONE_SINGLE_SPA=true

docker/.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
STANDALONE_SINGLE_SPA=false

docker/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"VUE_APP_PROJECT_MANAGER_BACKEND_URL" : "${VUE_APP_PROJECT_MANAGER_BACKEND_URL}"
3+
}

docker/keycloak.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"realm": "${VUE_APP_KEYCLOAK_REALM}",
3+
"auth-server-url": "${VUE_APP_KEYCLOAK_URL}",
4+
"ssl-required": "external",
5+
"resource": "${VUE_APP_KEYCLOAK_CLIENT_ID}",
6+
"public-client": true,
7+
"confidential-port": 0
8+
}
File renamed without changes.

0 commit comments

Comments
 (0)