Pokedex Online
A landing page for the Pokedex Online project, containerized and ready for deployment.
🚀 Local Development
Quick Start
# Open index.html directly in browser
open index.html
🐳 Docker Deployment
Build and Run Locally
# Build the image
docker build -t pokedex-online .
# Run the container
docker run -d -p 8080:80 --name pokedex-online pokedex-online
# View in browser
open http://localhost:8080
Using Docker Compose
# Start the service
docker-compose up -d
# Stop the service
docker-compose down
# View logs
docker-compose logs -f
📦 Portainer Deployment
Option 1: Stack Deployment (Recommended)
- Log into Portainer
- Navigate to Stacks → Add stack
- Name:
pokedex-online - Upload or paste the
docker-compose.ymlcontents - Click Deploy the stack
Option 2: Container Deployment
-
Build the image locally:
docker build -t pokedex-online:latest . -
Tag for your registry (if using):
docker tag pokedex-online:latest your-registry/pokedex-online:latest docker push your-registry/pokedex-online:latest -
In Portainer:
- Navigate to Containers → Add container
- Name:
pokedex-online - Image:
pokedex-online:latest(or your registry path) - Port mapping:
8080:80 - Restart policy:
unless-stopped - Deploy
Option 3: Git Repository (Portainer with BuildKit)
- In Portainer, navigate to Stacks → Add stack
- Choose Repository
- Repository URL: Your git repository URL
- Compose path:
code/websites/pokedex.online/docker-compose.yml - Deploy
🌐 Access
After deployment, access the site at:
- Local: http://localhost:8080
- Server: http://your-server-ip:8080
<EFBFBD> Automated Deployment to Synology
Prerequisites
-
SSH Configuration: Ensure SSH keys are configured for Synology NAS:
- Host:
synology_internal(10.0.0.81:2323) orsynology_external(home.gregrjacobs.com:2323) - User:
GregRJacobs - Key:
~/.ssh/ds3627xs_gregrjacobs
- Host:
-
Remote Path: Deployment target is
/volume1/docker/pokedex-online/baseon Synology
Deployment Commands
# Deploy to internal Synology (10.0.0.81) on default port 8080
npm run deploy:pokedex
# Deploy to internal with custom port
npm run deploy:pokedex -- --port 8081
# Deploy to external Synology (home.gregrjacobs.com)
npm run deploy:pokedex:external
# Deploy to external with custom port
npm run deploy:pokedex:external -- --port 3000
# Full custom deployment
npm run deploy:pokedex -- --target internal --port 8082
Deployment Process
The deployment script automatically:
- Connects to Synology via SSH using configured host
- Captures existing container state for rollback capability
- Transfers files (index.html, Dockerfile, docker-compose.yml) via SFTP
- Modifies docker-compose.yml port mapping based on
--portargument - Builds and starts the Docker container with
docker-compose up -d --build - Health checks the deployed container (5 retries with 3s intervals)
- Rolls back to previous image on failure, or cleans up if no previous deployment existed
Health Check
After deployment, the script verifies the container is responding by making HTTP requests to:
- Internal:
http://10.0.0.81:<port> - External:
http://home.gregrjacobs.com:<port>
If health check fails after 5 attempts, the deployment is rolled back automatically.
Rollback Behavior
- Existing container: Rolls back to previous Docker image
- New deployment: Runs
docker-compose down --volumes --remove-orphansto clean up
CLI Options
| Option | Values | Default | Description |
|---|---|---|---|
--target |
internal, external |
internal |
SSH host to deploy to |
--port |
1-65535 |
8080 |
HTTP port to expose on host |
Examples
# Production deployment to external Synology on port 80
npm run deploy:pokedex -- --target external --port 80
# Development deployment to internal Synology on port 8080
npm run deploy:pokedex:internal
# Test deployment on high port
npm run deploy:pokedex -- --port 9000
🔧 Configuration
Change Port
Edit docker-compose.yml:
ports:
- "3000:80" # Change 3000 to your desired port
Or use the --port argument during automated deployment.
Custom Domain
If using a reverse proxy (nginx, Traefik, Caddy):
labels:
- "traefik.enable=true"
- "traefik.http.routers.pokedex.rule=Host(`pokedex.yourdomain.com`)"
📁 Project Structure
pokedex.online/
├── index.html # Landing page
├── Dockerfile # Container configuration
├── docker-compose.yml # Compose configuration
└── README.md # This file
🛠️ Future Development
This is currently a landing page. Future plans:
- Interactive Pokédex with search
- Team builder
- Type effectiveness calculator
- Collection tracker
- Integration with Pokémon APIs
📝 Notes
- Uses nginx:alpine for minimal footprint (~23MB)
- Restart policy set to
unless-stopped - Watchtower compatible for auto-updates
- No environment variables needed for basic setup
Status: In Development
Last Updated: January 2026