mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
change project
This commit is contained in:
@@ -14,8 +14,6 @@ COPY . .
|
||||
# Собираем приложение
|
||||
RUN npm run build
|
||||
|
||||
# Настраиваем nginx
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# Копируем собранные файлы в volume
|
||||
VOLUME ["/dist"]
|
||||
CMD ["cp", "-r", "/app/dist/.", "/dist/"]
|
@@ -9,15 +9,13 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Обработка статических файлов
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
|
||||
# Проксирование API запросов
|
||||
location /api/ {
|
||||
proxy_pass http://backend/;
|
||||
proxy_pass http://backend/api/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
Reference in New Issue
Block a user