From be3072dc753ecf38382494bf9b5092b2e359847b Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 06:33:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20production=20Docker=20C?= =?UTF-8?q?ompose=20configuration=20for=20Pokedex=20Online?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docker-compose.production.yml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 code/websites/pokedex.online/docker-compose.production.yml diff --git a/code/websites/pokedex.online/docker-compose.production.yml b/code/websites/pokedex.online/docker-compose.production.yml new file mode 100644 index 0000000..26508b8 --- /dev/null +++ b/code/websites/pokedex.online/docker-compose.production.yml @@ -0,0 +1,67 @@ +version: '3.8' + +services: + # Frontend - Nginx serving built Vue.js app + frontend: + build: + context: . + dockerfile: Dockerfile.frontend + container_name: pokedex-frontend + ports: + - '8080:80' + - '8443:443' + depends_on: + backend: + condition: service_healthy + restart: unless-stopped + networks: + - pokedex-network + healthcheck: + test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:80/'] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + + # Backend - Node.js API server + backend: + build: + context: ./server + dockerfile: Dockerfile + container_name: pokedex-backend + ports: + - '3000:3000' + environment: + - NODE_ENV=production + - PORT=3000 + # OAuth credentials loaded from .env file + - CHALLONGE_CLIENT_ID=${CHALLONGE_CLIENT_ID} + - CHALLONGE_CLIENT_SECRET=${CHALLONGE_CLIENT_SECRET} + - REDIRECT_URI=${REDIRECT_URI} + - SESSION_SECRET=${SESSION_SECRET} + env_file: + - ./server/.env + volumes: + # Persist OAuth session data + - ./server/data:/app/data + # Persist logs + - ./server/logs:/app/logs + restart: unless-stopped + networks: + - pokedex-network + healthcheck: + test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:3000/health'] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + +networks: + pokedex-network: + driver: bridge + +volumes: + backend-data: + driver: local + backend-logs: + driver: local