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
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.log
|
||||
/node_modules/*
|
||||
/node_modules/*
|
||||
.vscode
|
||||
|
||||
@ -38,6 +38,10 @@ services:
|
||||
## NGINX ################################################
|
||||
#########################################################
|
||||
nginx:
|
||||
depends_on:
|
||||
- frontend
|
||||
- community-server
|
||||
- login-server
|
||||
volumes:
|
||||
- ./logs:/var/log/nginx
|
||||
|
||||
@ -60,4 +64,4 @@ services:
|
||||
|
||||
volumes:
|
||||
frontend_node_modules:
|
||||
conan:
|
||||
conan:
|
||||
@ -16,8 +16,6 @@ services:
|
||||
target: production
|
||||
networks:
|
||||
- external-net
|
||||
depends_on:
|
||||
- nginx
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
@ -135,4 +133,4 @@ networks:
|
||||
internal: true
|
||||
|
||||
volumes:
|
||||
db_vol:
|
||||
db_vol:
|
||||
@ -15,6 +15,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
lintOnSave: true,
|
||||
publicPath: '/vue/',
|
||||
configureWebpack: {
|
||||
// Set up all the aliases we use in our app.
|
||||
resolve: {
|
||||
@ -30,5 +31,6 @@ module.exports = {
|
||||
css: {
|
||||
// Enable CSS source maps.
|
||||
sourceMap: process.env.NODE_ENV !== 'production'
|
||||
}
|
||||
},
|
||||
outputDir: path.resolve(__dirname, "/vue" ),
|
||||
};
|
||||
|
||||
@ -12,15 +12,6 @@ server {
|
||||
|
||||
root /var/www/cakephp/webroot;
|
||||
index index.php;
|
||||
|
||||
location ~* \.(png|jpg|ico|webp)$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ~* \.(js|css) {
|
||||
# expires 1d;
|
||||
expires 1d;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass community-server:9000;
|
||||
@ -67,9 +58,33 @@ server {
|
||||
proxy_pass http://login-server:1201;
|
||||
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 / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# access_log /var/log/nginx/access.log main;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user