Add Coolify Docker config

This commit is contained in:
User
2026-08-14 14:34:13 +02:00
parent cb292f8cab
commit 9d30af80ae
2 changed files with 44 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# syntax=docker/dockerfile:1
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY <<'EOF' /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri /index.html;
}
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
EOF
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]