Skip to content
Snippets Groups Projects
Unverified Commit 088e0405 authored by Martin Weise's avatar Martin Weise
Browse files

Added healthcheck

parent e54ac904
No related branches found
No related tags found
2 merge requests!163Relase 1.3.0,!155Added readme to authentication service and added eureka service
......@@ -29,8 +29,12 @@ COPY --from=binary /usr/bin/curl /usr/bin/curl
USER root
COPY ./dbrepo-realm.json /opt/keycloak/data/import/dbrepo-realm.json
COPY ./service-register.sh /app/service-register.sh
COPY ./docker-entrypoint.sh /app/docker-entrypoint.sh
WORKDIR /app
COPY ./service-register.sh ./service-register.sh
COPY ./docker-entrypoint.sh ./docker-entrypoint.sh
COPY ./healthcheck.sh ./healthcheck.sh
ENV METADATA_USERNAME=root
ENV METADATA_PASSWORD=dbrepo
......@@ -45,4 +49,6 @@ ENV KEYCLOAK_IMPORT=/opt/keycloak/data/import/dbrepo-realm.json
ENV KEYCLOAK_ADMIN=keycloak
ENV KEYCLOAK_ADMIN_PASSWORD=keycloak
HEALTHCHECK --interval=10s --timeout=5s --retries=12 CMD ["bash", "/app/healthcheck.sh"]
ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"]
#!/bin/bash
HTTP_CODE=$(curl --silent --output /dev/stderr --write-out "%{http_code}" 'http://0.0.0.0:8080/realms/dbrepo')
if test $HTTP_CODE -ne 200; then
exit 1
fi
\ No newline at end of file
......@@ -123,7 +123,6 @@
<script>
import { isDeveloper } from '@/utils'
export default {
name: 'DefaultLayout',
data () {
......@@ -250,7 +249,7 @@ export default {
}
try {
this.loadingUser = true
const res = await this.$axios.put('/api/auth', {}, this.config)
const res = await this.$axios.get('/api/auth/realms/dbrepo/protocol/openid-connect/userinfo', this.keycloakConfig)
this.$store.commit('SET_USER', res.data)
console.debug('user information', this.user)
this.$vuetify.theme.dark = this.user.theme_dark
......@@ -315,7 +314,7 @@ export default {
}
try {
this.loading = true
const res = await this.$axios.get(`/api/container/${this.$route.params.container_id}/database/${this.$route.params.database_id}/access`, this.silentConfig)
const res = await this.$axios.get(`/api/container/${this.$route.params.container_id}/database/${this.$route.params.database_id}/access`, this.config)
this.access = res.data
this.$store.commit('SET_ACCESS', res.data)
console.debug('access', this.access)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment