Skip to content

Commit 929bc6e

Browse files
added nginx config and removed docker duplicate line
1 parent 968ac2d commit 929bc6e

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM node:18-alpine as build
22

33
WORKDIR /app
44

5-
COPY package*.json ./
65
COPY package*.json ./
76

87
RUN npm install

nginx.conf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
server {
2+
listen 80;
3+
server_name localhost;
4+
root /usr/share/nginx/html;
5+
index index.html;
6+
7+
location / {
8+
try_files $uri $uri/ /index.html;
9+
}
10+
11+
location /static/ {
12+
expires 1y;
13+
add_header Cache-Control "public";
14+
}
15+
16+
location /api/ {
17+
proxy_pass http://api:8080/;
18+
proxy_http_version 1.1;
19+
proxy_set_header Upgrade $http_upgrade;
20+
proxy_set_header Connection 'upgrade';
21+
proxy_set_header Host $host;
22+
proxy_cache_bypass $http_upgrade;
23+
}
24+
25+
error_page 500 502 503 504 /50x.html;
26+
location = /50x.html {
27+
root /usr/share/nginx/html;
28+
}
29+
}

0 commit comments

Comments
 (0)