Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit c1a3021

Browse files
authored
Merge pull request #19 from riseon-dev/feature/9/fixing-web-build
fixing builds
2 parents 2ba6dc3 + f76be55 commit c1a3021

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ RUN pnpm run -r build
1616
RUN pnpm deploy --filter=api --prod /prod/api && \
1717
cp -r "$(pnpm --filter=api list --depth=-1 --parseable)/dist" /prod/api/dist
1818
RUN pnpm deploy --filter=web --prod /prod/web && \
19-
cp -r "$(pnpm --filter=web list --depth=-1 --parseable)/dist" /prod/web
19+
cp -r "$(pnpm --filter=web list --depth=-1 --parseable)/dist" /prod/web && \
20+
cp -r "$(pnpm --filter=web list --depth=-1 --parseable)/nginx.conf" /prod/web/nginx.conf
2021

2122
FROM base AS api
2223
COPY --from=build /prod/api /prod/api
@@ -25,7 +26,7 @@ RUN ls -la
2526
EXPOSE 5000
2627
CMD [ "pnpm", "start:prod" ]
2728

28-
FROM base AS web
29+
FROM nginx:alpine AS web
2930
COPY --from=build /prod/web /usr/share/nginx/html
3031
EXPOSE 80
3132
CMD ["nginx", "-g", "daemon off;"]

services/web/nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
server {
2+
listen 80;
3+
4+
location / {
5+
root /usr/share/nginx/html;
6+
index index.html;
7+
try_files $uri /index.html;
8+
}
9+
}

0 commit comments

Comments
 (0)