modify pipeline to speed up deployment

This commit is contained in:
SennayT
2026-05-28 12:52:56 +03:00
parent 671d24b81d
commit 342ccb63de
23 changed files with 561 additions and 672 deletions

View File

@@ -1,63 +0,0 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server_tokens off;
upstream edr_freight_api {
server edr-freight-api:3001;
}
upstream edr_freight_web {
server edr-freight-web:5173;
}
upstream edr_passenger_api {
server edr-passenger-api:3002;
}
upstream edr_passenger_web {
server edr-passenger-web:5174;
}
server {
listen 80;
server_name freight.edr.local;
location /api/ {
proxy_pass http://edr_freight_api/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://edr_freight_web/;
proxy_set_header Host $host;
}
}
server {
listen 80;
server_name passenger.edr.local;
location /api/ {
proxy_pass http://edr_passenger_api/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://edr_passenger_web/;
proxy_set_header Host $host;
}
}
}

View File

@@ -0,0 +1,13 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
location / {
try_files $uri $uri/ /index.html;
}
}