Category : vue.js

As far as I search, there are several tips to place dynamic variables in nginx/conf.d/default.conf. Instead, I want to activate env variable in apiURLs.js file, which will be loaded in vue files. # apiURLs.js export const apiUrls = { auth: "http://{{IP_ADDRESS}}:8826/auth/", service1: "http://{{IP_ADDRESS}}:8826/", service2: "http://{{IP_ADDRESS}}:8827/" }; # in xxx.vue let apiUrl = `${apiUrls.auth}login/`; I tried ..

Read more

I’m trying to change de default port for a Vue.js app on docker. I used both examples in this official documentation: https://vuejs.org/v2/cookbook/dockerize-vuejs-app.html Dockerfile with http-server: FROM node:lts-alpine # install simple http server for serving static content RUN npm install -g http-server # make the ‘app’ folder the current working directory WORKDIR /app # copy both ..

Read more

I have the app deployed in one docker container: Frontend – VueJS (served by Nginx) Backend – Flask (gunicorn) Dockerfile: # Builder FROM node:10-alpine as builder WORKDIR /vue-ui COPY ./frontend/package*.json ./ RUN npm install COPY ./frontend . RUN npm run build #Production container FROM nginx:alpine as production-build WORKDIR /app RUN apk update && apk add ..

Read more

I have 3 Vue applications and serve them as independent projects on separate domains using the following documentation on nginx: https://cli.vuejs.org/guide/deployment.html#docker-nginx and each one works well without any problem. But now I want to serve them into a single domain as follows via nginx reverse proxy test.com/ –>> http://app-frontent1:3000 test.com/merchant –>> http://app-frontent2:3000 test.com/admin-panel –>> http://app-frontent3:3000 ..

Read more

I have project in nuxt js which works fine without docker in my Windows OS. I tried install it inside docker and run but get error with message: #9 126.5 ERROR in ./pages/index.vue #9 126.5 Module not found: Error: Can’t resolve ‘./main/index.js?vue&type=script&lang=js&’ in ‘/web/pages’ #9 126.5 @ ./pages/index.vue 2:0-61 3:0-56 3:0-56 10:2-8 #9 126.5 @ ..

Read more