Skip to content

Commit 64c4db8

Browse files
committed
add nginx conf
1 parent d8c5169 commit 64c4db8

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ FROM nginx:alpine-slim as final
1414
ARG VERSION=dev
1515
ENV VERSION=$VERSION
1616

17-
WORKDIR /usr/share/nginx/html
17+
WORKDIR /app
1818
COPY --from=build-ui /app/build ./
19+
COPY nginx.conf /etc/nginx/nginx.conf
1920

2021
RUN echo "Setting built version to $VERSION" && \
2122
sed -Ei "s/\\\$VERSION/$VERSION/" index.html

nginx.conf

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
user nginx;
2+
worker_processes 1;
3+
pid /tmp/nginx.pid;
4+
events {
5+
worker_connections 1024;
6+
}
7+
http {
8+
include /etc/nginx/mime.types;
9+
sendfile on;
10+
keepalive_timeout 65;
11+
server {
12+
listen 80;
13+
server_name localhost;
14+
location / {
15+
root /app;
16+
index index.html;
17+
try_files $uri $uri/ /index.html;
18+
}
19+
error_page 500 502 503 504 /50x.html;
20+
location = /50x.html {
21+
root /usr/share/nginx/html;
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)