-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
500f90f
commit 0f988a0
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM oven/bun:1.1.29 AS build | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN bun install | ||
RUN bun run build | ||
|
||
FROM ubuntu | ||
|
||
RUN apt-get update | ||
RUN apt-get install nginx -y | ||
|
||
COPY --from=build /app/dist /var/www/html/ | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /var/www/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri /index.html; | ||
} | ||
|
||
# Serve static files directly | ||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { | ||
try_files $uri =404; | ||
} | ||
|
||
# Optional: Gzip compression | ||
gzip on; | ||
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css; | ||
gzip_vary on; | ||
gzip_min_length 1024; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM oven/bun:1.1.12 | ||
FROM oven/bun:1.1.29 | ||
WORKDIR /app | ||
|
||
COPY . . | ||
|