feat: Docker bidez altxatzea ahalbidetzen du

This commit is contained in:
2026-08-17 10:10:10 +02:00
parent 3b7d04d9db
commit 2f18aa81bd
4 changed files with 45 additions and 1 deletions

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
v24.19.0

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# 1.- Builder
FROM node:24.19.0-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json astro.config.mjs tsconfig.json ./
COPY src ./src
COPY public ./public
# RUN npm install -g npm@12.0.2
RUN npm install
RUN npm run build
# 2.- Runtime
FROM node:24.19.0-alpine AS runner
WORKDIR /app
# Only copy necessary files
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nodejs -u 1001
USER nodejs
EXPOSE 4321
CMD ["node", "dist/server/entry.mjs"]

View File

@@ -9,7 +9,9 @@ import node from "@astrojs/node";
export default defineConfig({
integrations: [react()],
output: "server",
server: {
host: "0.0.0.0",
},
adapter: node({
mode: "standalone",
}),

12
docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
services:
yt2rss:
build:
context: .
container_name: yt2rss
ports:
- "4321:4321"
environment:
NODE_ENV: production
HOST: "0.0.0.0"
PORT: "4321"
restart: unless-stopped