unified all urls of our services. every server now serves on / and nginxs routes accordingly

This commit is contained in:
Ulf Gebhardt 2022-01-08 07:41:00 +01:00
parent 44da4ea433
commit b6bd3f839d
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
7 changed files with 10 additions and 13 deletions

View File

@ -5,7 +5,7 @@ import routes from './routes'
Vue.use(VueRouter)
const router = new VueRouter({
base: '/admin',
base: '/',
routes,
linkActiveClass: 'active',
mode: 'history',

View File

@ -17,7 +17,7 @@ module.exports = {
},
},
lintOnSave: true,
publicPath: '/admin',
publicPath: '/',
configureWebpack: {
// Set up all the aliases we use in our app.
resolve: {

View File

@ -13,7 +13,7 @@ async function main() {
console.log(`Server is running at http://localhost:${CONFIG.PORT}`)
if (CONFIG.GRAPHIQL) {
// eslint-disable-next-line no-console
console.log(`GraphIQL available at http://localhost:${CONFIG.PORT}/graphql`)
console.log(`GraphIQL available at http://localhost:${CONFIG.PORT}`)
}
})
}

View File

@ -67,7 +67,7 @@ const createServer = async (context: any = serverContext): Promise<any> => {
context,
plugins,
})
apollo.applyMiddleware({ app })
apollo.applyMiddleware({ app, path: '/' })
return { apollo, app, con }
}

View File

@ -53,8 +53,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
#todo remove /graphql
proxy_pass http://127.0.0.1:4000/graphql;
proxy_pass http://127.0.0.1:4000;
proxy_redirect off;
}
@ -67,7 +66,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080/;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
}

View File

@ -38,8 +38,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
#todo remove /graphql
proxy_pass http://127.0.0.1:4000/graphql;
proxy_pass http://127.0.0.1:4000;
proxy_redirect off;
}
@ -52,7 +51,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080/;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
}

View File

@ -38,8 +38,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
#todo remove /graphql
proxy_pass http://backend:4000/graphql;
proxy_pass http://backend:4000;
proxy_redirect off;
}
@ -52,7 +51,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://admin:8080/;
proxy_pass http://admin:8080;
proxy_redirect off;
}