Compare commits
2 Commits
fix-docker
...
configure-
Author | SHA1 | Date | |
---|---|---|---|
000946c52d | |||
7bba73ceae |
@ -1,11 +1,2 @@
|
||||
.browserslistrc
|
||||
.dockerignore
|
||||
.drone.yml
|
||||
.editorconfig
|
||||
.git
|
||||
.gitignore
|
||||
.reuse
|
||||
Dockerfile
|
||||
LICENSES
|
||||
README.md
|
||||
node_modules
|
||||
|
@ -21,13 +21,6 @@ steps:
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run lint
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.wtf-eg.de
|
||||
repo: git.wtf-eg.de/kompetenzinventar/frontend
|
||||
target: ki-frontend
|
||||
dry_run: true
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
14
Dockerfile
14
Dockerfile
@ -4,25 +4,25 @@
|
||||
|
||||
FROM node:14-alpine as builder
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY .eslintrc.js .
|
||||
COPY babel.config.js .
|
||||
COPY public public
|
||||
COPY src src
|
||||
COPY . ./
|
||||
|
||||
RUN npm ci && npm run build
|
||||
|
||||
|
||||
FROM nginx as ki-frontend
|
||||
|
||||
COPY --from=builder /dist/ /usr/share/nginx/html/
|
||||
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
LABEL org.opencontainers.image.source=https://git.wtf-eg.de/kompetenzinventar/ki-frontend.git
|
||||
LABEL org.opencontainers.image.url=https://git.wtf-eg.de/kompetenzinventar/ki-frontend
|
||||
LABEL org.opencontainers.image.documentation=https://git.wtf-eg.de/kompetenzinventar/ki-frontend#docker
|
||||
LABEL org.opencontainers.image.vendor="WTF Kooperative eG"
|
||||
|
||||
ENV KI_API_URL http://ki-backend:5000
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY configure.sh /docker-entrypoint.d/
|
||||
COPY --from=builder /dist .
|
||||
|
13
configure.sh
Executable file
13
configure.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
set -o errexit
|
||||
set +x
|
||||
|
||||
: ${KI_API_URL:=http://ki-backend:5000}
|
||||
|
||||
sed -e "s%\$KI_API_URL%$KI_API_URL%g" /usr/share/nginx/html/config.js.in > /usr/share/nginx/html/config.js
|
||||
|
||||
exec "$@"
|
7
public/config.js.in
Normal file
7
public/config.js.in
Normal file
@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
window.ki = {
|
||||
apiUrl: "$KI_API_URL"
|
||||
}
|
@ -95,11 +95,10 @@ export default {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
async submitFormEdit(isProfileVisible) {
|
||||
async submitFormEdit() {
|
||||
this.showErrorMessage = false
|
||||
this.showSuccessMessage = false
|
||||
const userId = store.state.currentUserId
|
||||
this.profile.visible = isProfileVisible;
|
||||
|
||||
try {
|
||||
const body = JSON.stringify(this.profile)
|
||||
|
@ -12,8 +12,25 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<form @submit.prevent="submitFormEdit(false)">
|
||||
<form @submit.prevent="submitFormEdit()">
|
||||
<Section title="Grunddaten">
|
||||
<div class="mb-4">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
v-model="profile.visible"
|
||||
id="visibility"
|
||||
>
|
||||
<label
|
||||
class="form-check-label"
|
||||
for="visibility">
|
||||
Profil für angemeldete Benutzer sichtbar
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-12 col-md-4 mb-3 mb-md-0">
|
||||
<label class="form-label">Nickname</label>
|
||||
@ -205,17 +222,11 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
<i class="bi bi-check-lg"></i>
|
||||
Gespeichert
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-secondary ms-3"
|
||||
@click="submitFormEdit(false)"
|
||||
>
|
||||
Entwurf Speichern
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary ms-3"
|
||||
@click="submitFormEdit(true)"
|
||||
@click="submitFormEdit()"
|
||||
>
|
||||
Speichern und Veröffentlichen
|
||||
Speichern
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user