From 31c40ecd6b782eb8ac1f145617f4712ac86c41f9 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 06:33:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20Update=20Dockerfile=20to=20optim?= =?UTF-8?q?ize=20image=20build=20process=20and=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websites/pokedex.online/server/Dockerfile | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 code/websites/pokedex.online/server/Dockerfile diff --git a/code/websites/pokedex.online/server/Dockerfile b/code/websites/pokedex.online/server/Dockerfile new file mode 100644 index 0000000..8e5e8cd --- /dev/null +++ b/code/websites/pokedex.online/server/Dockerfile @@ -0,0 +1,31 @@ +# Backend Production Dockerfile +FROM node:20-alpine + +# Set working directory +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install production dependencies only +RUN npm ci --only=production + +# Copy application code +COPY . . + +# Create directories for data and logs +RUN mkdir -p /app/data /app/logs + +# Set production environment +ENV NODE_ENV=production +ENV PORT=3000 + +# Expose the server port +EXPOSE 3000 + +# Health check endpoint (will be added to server) +HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ + CMD node -e "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" + +# Run the application +CMD ["node", "oauth-proxy.js"]