Agregado contenedor y configuracion de rutas para vite
This commit is contained in:
parent
21b16e0243
commit
aa75e3de79
2 changed files with 33 additions and 1 deletions
|
@ -18,6 +18,22 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
|
vite:
|
||||||
|
build:
|
||||||
|
args:
|
||||||
|
user: www
|
||||||
|
uid: ${USERID}
|
||||||
|
context: ./
|
||||||
|
container_name: vite
|
||||||
|
working_dir: /var/www
|
||||||
|
command: npm run dev
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www
|
||||||
|
ports:
|
||||||
|
- "5173:5173"
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
container_name: pedi2-db
|
container_name: pedi2-db
|
||||||
|
|
|
@ -13,6 +13,22 @@ server {
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
}
|
}
|
||||||
|
location ^~ /@vite/ {
|
||||||
|
proxy_pass http://vite:5173;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
location ^~ /resources/ {
|
||||||
|
proxy_pass http://vite:5173;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
gzip_static on;
|
gzip_static on;
|
||||||
|
|
Loading…
Add table
Reference in a new issue