Skip to content

Commit

Permalink
Add nginx configuration (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxvd authored Aug 21, 2024
1 parent 89f872a commit 85200d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ FROM nginx:1.25.1-alpine AS RELEASE
# copy generated static site
COPY --from=build /app/public /usr/share/nginx/html

# copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf

# make readonly to nginx
RUN chown -R root:nginx /usr/share/nginx/html && \
chmod -R go-w /usr/share/nginx/html
Expand Down
15 changes: 15 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

0 comments on commit 85200d4

Please sign in to comment.