added nginx.conf

This commit is contained in:
2025-06-01 03:24:54 +02:00
parent a94d6d6b1d
commit db0fe61673
2 changed files with 11 additions and 25 deletions

View File

@@ -1,25 +0,0 @@
# Stage 1: Build with pnpm
FROM node:20-alpine AS builder
WORKDIR /app
# Install pnpm globally
RUN corepack enable && corepack prepare pnpm@latest --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
RUN pnpm build
# Stage 2: Serve with nginx
FROM nginx:alpine
# Copy built files to nginx's web directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 3087
EXPOSE 3087
# Change default nginx config to use port 3087
RUN sed -i 's/80;/3087;/' /etc/nginx/conf.d/default.conf

11
nginx.conf Normal file
View File

@@ -0,0 +1,11 @@
server {
listen 8097;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}