Skip to content

Commit

Permalink
chores: fix nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-pluto committed Nov 3, 2023
1 parent f48d02b commit e3b80ad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion captain-definition
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
"dockerfilePath": "./config/Dockerfile"
}
5 changes: 2 additions & 3 deletions Dockerfile → config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ RUN npm run build
# Use Nginx as the production server
FROM nginx:alpine

WORKDIR /usr/share/nginx/html

COPY --from=build /app/dist .
COPY config/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 80

Expand Down
15 changes: 15 additions & 0 deletions config/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 /index.html;
}

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

0 comments on commit e3b80ad

Please sign in to comment.