7 changed files with 48 additions and 1 deletions
@ -0,0 +1,16 @@ |
|||||
|
FROM node:18.18-bullseye as builder |
||||
|
RUN git clone https://git.pblr-nyk.pro/gsd/Facti13.Frontend.VueMaterial && \ |
||||
|
mv Facti13.Frontend.VueMaterial /app && chown node:node -R /app && chmod 770 -R /app |
||||
|
WORKDIR /app |
||||
|
USER node |
||||
|
ARG BUILDDATE |
||||
|
ENV BUILDDATE $BUILDDATE |
||||
|
RUN npm install && npm run build |
||||
|
|
||||
|
FROM nginx:stable-alpine |
||||
|
COPY --from=builder /app/dist /usr/share/nginx/html |
||||
|
RUN rm /etc/nginx/conf.d/default.conf |
||||
|
COPY srv.conf /etc/nginx/conf.d |
||||
|
CMD ["nginx", "-g", "daemon off;"] |
||||
|
#ENTRYPOINT ['npm', 'run', 'serve'] |
||||
|
|
@ -0,0 +1,7 @@ |
|||||
|
services: |
||||
|
facti13_vue: |
||||
|
build: ./ |
||||
|
container_name: facti13_vue_app |
||||
|
ports: |
||||
|
- 26282:80 |
||||
|
restart: always |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
docker compose build --build-arg BUILDDATE=$(date +%s) && docker compose down && docker compose up -d && docker compose logs -f |
@ -0,0 +1,19 @@ |
|||||
|
server { |
||||
|
listen 80; |
||||
|
listen [::]:80; |
||||
|
server_name localhost; |
||||
|
|
||||
|
location / { |
||||
|
root /usr/share/nginx/html; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
location /api { |
||||
|
proxy_pass http://192.168.3.3:26272; |
||||
|
proxy_redirect off; |
||||
|
proxy_set_header Host $host; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
add_header 'Access-Control-Allow-Origin' '*' always; |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue