environment variables

This commit is contained in:
ManjaroOne666 2019-02-25 18:14:38 +00:00
parent fad9a88f42
commit 96c692f8a2
2 changed files with 18 additions and 5 deletions

View File

@ -3,10 +3,18 @@ const pkg = require('./package')
module.exports = {
mode: 'universal',
server: {
port: 3003,
host: '0.0.0.0'
env: {
urlInternal: process.env.URL_INTERNAL,
urlExternal: process.env.URL_EXTERNAL,
portApp: process.env.PORT_APP,
portServer: process.env.PORT_SERVER,
},
server: {
port: process.env.portApp,
host: process.env.urlInternal,
},
serverMiddleware: [
'~/api/contact',
],
@ -98,12 +106,12 @@ module.exports = {
axios: {
// See https://github.com/nuxt-community/axios-module#options
proxy: true,
baseURL: 'http://192.168.0.101:3003',
baseURL: 'http://' + process.env.urlExternal + ':' + process.env.portApp,
debug: false,
},
proxy: {
'/api/v1/': 'http://192.168.0.101:3004'
'/api/v1/': 'http://' + process.env.urlExternal + ':' + process.env.portServer
},
/*

View File

@ -7,6 +7,11 @@ services:
restart: always
ports:
- ${URL_INTERNAL}:3003:3003
environment:
- URL_INTERNAL: ${URL_INTERNAL}
- URL_EXTERNAL: ${URL_EXTERNAL}
- PORT_APP: ${PORT_APP}
- PORT_SERVER: ${PORT_SERVER}
command:
"npm run dev"