fix(dockerfile) changed port with nginx static route
This commit is contained in:
+1
-2
@@ -31,7 +31,7 @@ services:
|
|||||||
container_name: mrp_frontend
|
container_name: mrp_frontend
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "89:89"
|
- "80:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
# Добавляем разрешение хоста для Vite прямо тут
|
# Добавляем разрешение хоста для Vite прямо тут
|
||||||
@@ -40,4 +40,3 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pg_data:
|
pg_data:
|
||||||
|
|
||||||
|
|||||||
+4
-15
@@ -14,20 +14,9 @@ FROM nginx:stable-alpine
|
|||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
|
||||||
COPY <<EOF /etc/nginx/conf.d/default.conf
|
COPY <<'EOF' /etc/nginx/conf.d/default.conf
|
||||||
server {
|
server {
|
||||||
listen 89;
|
listen 80;
|
||||||
|
|
||||||
location /register {
|
|
||||||
proxy_pass http://backend:8090;
|
|
||||||
proxy_set_header Host \$host;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /login {
|
|
||||||
proxy_pass http://backend:8090;
|
|
||||||
proxy_set_header Host \$host;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /api {
|
location /api {
|
||||||
proxy_pass http://backend:8090;
|
proxy_pass http://backend:8090;
|
||||||
}
|
}
|
||||||
@@ -36,11 +25,11 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
try_files \$uri \$uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
EXPOSE 89
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
Reference in New Issue
Block a user