Files
standardnotes-app-web/Dockerfile
Radosław Morawski 2ffd3a64cb
Some checks are pending
Sync Repo / git-sync (push) Waiting to run
disable paywall
2026-03-26 20:03:17 +01:00

30 lines
530 B
Docker

# Etap 1: build
FROM node:20-alpine AS builder
WORKDIR /app
RUN corepack enable
COPY . .
RUN yarn install --frozen-lockfile
RUN yarn build:web
# Etap 2: serwer nginx
FROM nginx:alpine
COPY --from=builder /app/packages/web/dist /usr/share/nginx/html
# SPA fallback
RUN printf 'server {\n\
listen 80;\n\
server_name _;\n\
root /usr/share/nginx/html;\n\
index index.html;\n\
location / {\n\
try_files $uri /index.html;\n\
}\n\
}\n' > /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]