Skip to content

Commit

Permalink
webapp progress
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGingi committed Nov 14, 2024
1 parent fe8d7fb commit 7d47d85
Show file tree
Hide file tree
Showing 49 changed files with 906 additions and 8,626 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ server/node_modules

src/node_modules

.docker
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20-alpine as builder

WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
rusty-notes-webapp:
build: .
ports:
- "8080:80"
restart: unless-stopped
16 changes: 16 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}

# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 1y;
add_header Cache-Control "public, no-transform";
}
}
Loading

0 comments on commit 7d47d85

Please sign in to comment.