mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
use vue-client with nginx, so no CORS problems shoud be occure
This commit is contained in:
parent
1949260452
commit
eabf0621fc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*.log
|
*.log
|
||||||
/node_modules/*
|
/node_modules/*
|
||||||
|
.vscode
|
||||||
|
|||||||
@ -38,6 +38,10 @@ services:
|
|||||||
## NGINX ################################################
|
## NGINX ################################################
|
||||||
#########################################################
|
#########################################################
|
||||||
nginx:
|
nginx:
|
||||||
|
depends_on:
|
||||||
|
- frontend
|
||||||
|
- community-server
|
||||||
|
- login-server
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/var/log/nginx
|
- ./logs:/var/log/nginx
|
||||||
|
|
||||||
|
|||||||
@ -16,8 +16,6 @@ services:
|
|||||||
target: production
|
target: production
|
||||||
networks:
|
networks:
|
||||||
- external-net
|
- external-net
|
||||||
depends_on:
|
|
||||||
- nginx
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -15,6 +15,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
lintOnSave: true,
|
lintOnSave: true,
|
||||||
|
publicPath: '/vue/',
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
// Set up all the aliases we use in our app.
|
// Set up all the aliases we use in our app.
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -30,5 +31,6 @@ module.exports = {
|
|||||||
css: {
|
css: {
|
||||||
// Enable CSS source maps.
|
// Enable CSS source maps.
|
||||||
sourceMap: process.env.NODE_ENV !== 'production'
|
sourceMap: process.env.NODE_ENV !== 'production'
|
||||||
}
|
},
|
||||||
|
outputDir: path.resolve(__dirname, "/vue" ),
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,15 +13,6 @@ server {
|
|||||||
root /var/www/cakephp/webroot;
|
root /var/www/cakephp/webroot;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
location ~* \.(png|jpg|ico|webp)$ {
|
|
||||||
expires 30d;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~* \.(js|css) {
|
|
||||||
# expires 1d;
|
|
||||||
expires 1d;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_pass community-server:9000;
|
fastcgi_pass community-server:9000;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
@ -68,6 +59,30 @@ server {
|
|||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /vue {
|
||||||
|
|
||||||
|
|
||||||
|
location /vue/sockjs-node {
|
||||||
|
rewrite /vue/(.*) /$1;
|
||||||
|
}
|
||||||
|
location ~* \.(png) {
|
||||||
|
expires 1d;
|
||||||
|
rewrite /vue/(.*) /$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
#rewrite /vue/(.*) /$1 break;
|
||||||
|
|
||||||
|
proxy_pass http://frontend:8080;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$args;
|
try_files $uri $uri/ /index.php?$args;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user