Skip to content
Snippets Groups Projects
Commit 90053f6f authored by Henrik's avatar Henrik
Browse files

fix: fix 27

parent 6f0cbd0a
No related branches found
No related tags found
1 merge request!91Feat/deployment
Pipeline #283976 skipped
VUE_APP_API_URL=http://localhost:8080/
\ No newline at end of file
VUE_APP_API_URL=http://backend:8080/
\ No newline at end of file
......@@ -36,5 +36,5 @@ deploy_docker:
- apt-get -yqq install ssh
- apt-get install sshpass
script:
- sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker rm -f frontend || true; docker pull registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend && docker run -d -p 81:80 --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend"
- sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker rm -f frontend || true; docker pull registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend && docker run -d -p 81:80 --build-arg VUE_APP_API_URL=http://backend:8080/ --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend"
when: manual
\ No newline at end of file
......@@ -4,7 +4,9 @@ WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV API_URL=backend:80
#ENV API_URL=http://backend:8080
ARG VUE_APP_API_URL
ENV VUE_APP_API_URL $VUE_APP_API_URL
RUN npm run build
# Step 2: Setup the server with Nginx
......
......@@ -2,7 +2,8 @@
import { RouterView } from 'vue-router'
import ErrorBoundaryCatcher from '@/components/Exceptions/ErrorBoundaryCatcher.vue';
console.log("TEST!");
console.log("env: ", process.env.API_URL);
let apiUrl = import.meta.env.VUE_APP_API_URL;
console.log("apiUrl: ", apiUrl);
</script>
<template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment