Spaces:
Sleeping
Sleeping
OcDash Deploy commited on
Commit ·
2777a2e
1
Parent(s): 052eea3
update: fresh build
Browse files- Dockerfile +10 -7
- nginx.conf +1 -1
Dockerfile
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM nginx:alpine
|
| 2 |
-
COPY
|
| 3 |
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
rm -rf /usr/share/nginx/html/.git 2>/dev/null; \
|
| 7 |
-
chmod +x /start.sh
|
| 8 |
-
EXPOSE 8080
|
| 9 |
-
CMD ["/start.sh"]
|
|
|
|
| 1 |
+
FROM node:20-alpine AS base
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY package.json ./
|
| 4 |
+
RUN npm install
|
| 5 |
+
COPY . .
|
| 6 |
+
RUN npm run build
|
| 7 |
+
|
| 8 |
FROM nginx:alpine
|
| 9 |
+
COPY --from=base /app/dist /usr/share/nginx/html
|
| 10 |
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 11 |
+
EXPOSE 80
|
| 12 |
+
CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
|
|
|
|
|
|
|
|
nginx.conf
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
server {
|
| 2 |
-
listen
|
| 3 |
root /usr/share/nginx/html;
|
| 4 |
index index.html;
|
| 5 |
location / {
|
|
|
|
| 1 |
server {
|
| 2 |
+
listen 80;
|
| 3 |
root /usr/share/nginx/html;
|
| 4 |
index index.html;
|
| 5 |
location / {
|