Self-hosted climate transparency for enterprises
This guide covers two main tasks:
This is the fastest way to test if your container works without setting up a full Pterodactyl instance.
Using Docker:
# Navigate to the web directory
cd web
# Build the container image
docker build -t openeco-web:local -f Containerfile .
Using Podman (Docker-compatible alternative):
# Navigate to the web directory
cd web
# Build the container image (same command!)
podman build -t openeco-web:local -f Containerfile .
Note: Podman is a Docker-compatible container runtime. Most Docker commands work with Podman by simply replacing
dockerwithpodman. Docker Desktop is free for personal use, but Podman is fully open-source and doesn’t require a daemon.
Create a .env file in deploy/pterodactyl/:
# Create the .env file
cd ..\deploy\pterodactyl
New-Item -ItemType File -Path .env -Force
Edit .env with these values:
# PostgreSQL password (change this!)
POSTGRES_PASSWORD=your_secure_password_here
# Web application port
WEB_PORT=3000
# Docker image (use local build)
WEB_IMAGE=openeco-web:local
# Domain (for local testing, use localhost)
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Generate a secure secret (run this in PowerShell):
# [Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Minimum 0 -Maximum 256 }))
NEXTAUTH_SECRET=your_generated_secret_here_min_32_chars
Generate NEXTAUTH_SECRET:
# Run this in PowerShell to generate a secure secret:
$bytes = New-Object byte[] 32
[System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes)
[Convert]::ToBase64String($bytes)
Using Docker Compose:
# Make sure you're in deploy/pterodactyl directory
cd deploy\pterodactyl
# Start the containers
docker-compose -f docker-compose.demo.yml up -d
# Check if containers are running
docker-compose -f docker-compose.demo.yml ps
Using Podman Compose:
# Make sure you're in deploy/pterodactyl directory
cd deploy\pterodactyl
# Start the containers (Podman Compose is compatible)
podman-compose -f docker-compose.demo.yml up -d
# Or use podman play kube (if you convert compose to kube)
# Check if containers are running
podman-compose -f docker-compose.demo.yml ps
Note: Podman Compose works the same way. If you don’t have
podman-compose, you can install it or usepodman play kubewith a converted Kubernetes YAML.
Using Docker Compose:
# Wait a few seconds for containers to start, then run migrations
docker-compose -f docker-compose.demo.yml exec web npx prisma generate
docker-compose -f docker-compose.demo.yml exec web npx prisma db push
Using Podman Compose:
# Wait a few seconds for containers to start, then run migrations
podman-compose -f docker-compose.demo.yml exec web npx prisma generate
podman-compose -f docker-compose.demo.yml exec web npx prisma db push
docker-compose -f docker-compose.demo.yml logs -f web
Look for: Ready on http://localhost:3000
Open in browser:
Navigate to http://localhost:3000
# Test the health endpoint
curl http://localhost:3000/api/health
docker-compose -f docker-compose.demo.yml down
If you want to use the actual Pterodactyl panel for management:
Install Docker or Podman (if not installed):
Docker (Free for personal use):
# On Windows, install Docker Desktop from docker.com
# On Linux:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
Podman (Fully open-source, no daemon required):
# On Linux (most distributions):
# Fedora/RHEL/CentOS:
sudo dnf install podman podman-compose
# Ubuntu/Debian:
sudo apt-get install podman podman-compose
# On macOS:
brew install podman
# On Windows (WSL2 recommended):
# Install via WSL2, then use podman commands
Docker vs Podman: Docker Desktop is free for personal use. Podman is fully open-source, doesn’t require a daemon, and is rootless by default. Both work with the same commands (just replace
dockerwithpodman).
OpenEco Demoopeneco-web:local (or your built image)npm run start3000DATABASE_URL=postgresql://openeco_demo:password@postgres:5432/openeco_demo
NEXTAUTH_SECRET=your-secret-here
NEXTAUTH_URL=https://your-domain.com
NEXT_PUBLIC_APP_URL=https://your-domain.com
NODE_ENV=production
PORT=3000
npx prisma generate && npx prisma db pushThe mockups show these main screens:
The EcoKit design system is already in docs/assets/EcoKit/. We need to copy it to the web app.
# Create assets directory in web app
New-Item -ItemType Directory -Path "web\public\assets\EcoKit" -Force
# Copy EcoKit files (adjust paths as needed)
Copy-Item -Path "docs\assets\EcoKit\*" -Destination "web\public\assets\EcoKit\" -Recurse
Add to web/app/globals.css:
/* Import EcoKit Design System */
@import url('/assets/EcoKit/ecokit.css');
Based on the mockups, we need:
Using Docker:
# 1. Build container
cd web
docker build -t openeco-web:local -f Containerfile .
# 2. Set up environment
cd ..\deploy\pterodactyl
# Edit .env file with your values
# 3. Start containers
docker-compose -f docker-compose.demo.yml up -d
# 4. Run migrations
docker-compose -f docker-compose.demo.yml exec web npx prisma generate
docker-compose -f docker-compose.demo.yml exec web npx prisma db push
# 5. View logs
docker-compose -f docker-compose.demo.yml logs -f web
# 6. Access at http://localhost:3000
Using Podman (replace docker with podman):
# 1. Build container
cd web
podman build -t openeco-web:local -f Containerfile .
# 2. Set up environment
cd ..\deploy\pterodactyl
# Edit .env file with your values
# 3. Start containers
podman-compose -f docker-compose.demo.yml up -d
# 4. Run migrations
podman-compose -f docker-compose.demo.yml exec web npx prisma generate
podman-compose -f docker-compose.demo.yml exec web npx prisma db push
# 5. View logs
podman-compose -f docker-compose.demo.yml logs -f web
# 6. Access at http://localhost:3000
# 1. Copy EcoKit to web app
Copy-Item -Path "docs\assets\EcoKit\*" -Destination "web\public\assets\EcoKit\" -Recurse
# 2. Install dependencies (if needed)
cd web
npm install
# 3. Run dev server
npm run dev
# 4. Access at http://localhost:3000
docker-compose -f docker-compose.demo.yml logs web
NEXTAUTH_SECRET is at least 32 charactersDATABASE_URL is correctdocker-compose -f docker-compose.demo.yml exec postgres psql -U openeco_demo -d openeco_demo
Test-Path "web\public\assets\EcoKit\ecokit.css"
Check browser console for errors
globals.cssdocker-compose -f docker-compose.demo.yml exec web npx prisma migrate reset
docker-compose -f docker-compose.demo.yml exec web npx prisma validate
After successful deployment: