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) Vue.use(VueRouter)
const router = new VueRouter({ const router = new VueRouter({
base: '/admin', base: '/',
routes, routes,
linkActiveClass: 'active', linkActiveClass: 'active',
mode: 'history', mode: 'history',

View File

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

View File

@ -13,7 +13,7 @@ async function main() {
console.log(`Server is running at http://localhost:${CONFIG.PORT}`) console.log(`Server is running at http://localhost:${CONFIG.PORT}`)
if (CONFIG.GRAPHIQL) { if (CONFIG.GRAPHIQL) {
// eslint-disable-next-line no-console // 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, context,
plugins, plugins,
}) })
apollo.applyMiddleware({ app }) apollo.applyMiddleware({ app, path: '/' })
return { apollo, app, con } return { apollo, app, con }
} }

View File

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

View File

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

View File

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