Browse Source

docker fix

master
gsd 1 week ago
parent
commit
35517836a9
  1. 8
      Dockerfile
  2. 12
      srv.conf

8
Dockerfile

@ -4,6 +4,8 @@ COPY . .
RUN npm install --reg https://nexus.pblr-nyk.pro/repository/npm/ && \
npm run ng build
FROM nginx:alpine
RUN rm -r /var/www/html
COPY --from=builder /build/dist/f13_ang_web /var/www/html
FROM nginx:stable-alpine
COPY --from=builder /build/dist/f13_ang_web /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY srv.conf /etc/nginx/conf.d
CMD ["nginx", "-g", "daemon off;"]

12
srv.conf

@ -0,0 +1,12 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri /index.html;
}
}
Loading…
Cancel
Save