Sign inSign up

devedse/openfrontio

By devedse

Updated 8 months ago

OpenFrontIO - Online real-time strategy game

Buildkit cache
Image
0

4.6K

devedse/openfrontio repository overview

OpenFrontIO Docker Build

Automated Docker builds for OpenFrontIO - an online real-time strategy game focused on territorial control and alliance building.

🚀 Quick Start

A docker-compose.yml file is included in this repository. Access the game at http://localhost after starting.

📦 Available Tags

  • latest - Latest build from the main branch
  • YYYYMMDD-HHMMSS - Timestamped builds from the nightly scheduled runs
  • Custom tags created via manual workflow dispatch

🔧 Building Locally

Using PowerShell Script

The included PowerShell script will clone the repository and build the image:

# Build only
.\build-local.ps1

# Build and push to Docker Hub
.\build-local.ps1 -Push

# Build with custom tag
.\build-local.ps1 -Push -Tag "v1.0.0"
Manual Docker Build
  1. Clone the OpenFrontIO repository:
git clone https://github.com/openfrontio/OpenFrontIO.git
cd OpenFrontIO
  1. Build the image:
docker build -t devedse/openfrontio:latest .
  1. Push to Docker Hub (optional):
docker push devedse/openfrontio:latest

🤖 Automated Builds

This repository includes a GitHub Actions workflow that:

  • ✅ Runs every night at 2 AM UTC (scheduled build)
  • ✅ Can be manually triggered via workflow dispatch
  • ✅ Clones the latest OpenFrontIO code
  • ✅ Builds a Docker image with the latest changes
  • ✅ Tags the image with timestamp and commit hash
  • ✅ Pushes to Docker Hub automatically
Manual Trigger
  1. Go to the Actions tab
  2. Select "Build and Push OpenFrontIO to Docker Hub"
  3. Click "Run workflow"
  4. Optionally specify a custom tag
  5. Click "Run workflow" to start

🔑 Setup

For GitHub Actions

Add the following secret to your repository:

  • DOCKERHUBTOKEN - Your Docker Hub access token

To create a Docker Hub token:

  1. Go to Docker Hub Account Settings
  2. Click "New Access Token"
  3. Give it a description and appropriate permissions
  4. Copy the token and add it to your GitHub repository secrets
For Local Builds

Login to Docker Hub before pushing:

docker login

Or with PowerShell:

docker login

📝 Configuration

Environment Variables

The OpenFrontIO container supports the following environment variables:

VariableDescriptionRequired
CF_ACCOUNT_IDCloudflare Account ID (for tunnel setup)No
CF_API_TOKENCloudflare API TokenNo
DOMAINYour domain nameNo
SUBDOMAINSubdomain for the deploymentNo
TURNSTILE_SECRET_KEYCloudflare Turnstile secret keyNo
API_KEYAPI key for backend servicesNo
Volumes
  • /etc/cloudflared - Cloudflare tunnel configuration (persisted)
Ports
  • 80 - HTTP web server (nginx)

🏗️ Architecture

The Docker image is built from the official OpenFrontIO repository using their multi-stage Dockerfile:

  1. Build Stage - Installs dependencies and builds the application using Node.js and Vite
  2. Production Stage - Creates a minimal production image with:
    • Node.js runtime
    • Nginx web server
    • Cloudflared (for Cloudflare tunnel support)
    • Supervisor (for process management)
    • Built application files

📚 OpenFrontIO Features

  • Real-time Strategy Gameplay: Expand your territory and engage in strategic battles
  • Alliance System: Form alliances with other players for mutual defense
  • Multiple Maps: Play across various geographical regions
  • Resource Management: Balance expansion with defensive capabilities
  • Cross-platform: Runs in any modern web browser

📜 License

OpenFrontIO source code is licensed under the GNU Affero General Public License v3.0. For asset licensing, see the LICENSE-ASSETS file.

This Docker build repository is maintained separately and is not officially affiliated with the OpenFrontIO project.

🤝 Contributing

This is a build automation repository. For contributing to OpenFrontIO itself, please visit the main repository.

💡 Support

For OpenFrontIO game issues, please visit:

For Docker build issues related to this repository, please open an issue here.

🎮 Advanced Usage

Development Mode

To run with development settings and access logs:

docker run -d \
  --name openfrontio-dev \
  -p 80:80 \
  -v $(pwd)/logs:/var/log/supervisor \
  devedse/openfrontio:latest
With Custom Nginx Configuration
docker run -d \
  --name openfrontio \
  -p 80:80 \
  -v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro \
  devedse/openfrontio:latest
Check Container Logs
# All logs
docker logs openfrontio

# Follow logs
docker logs -f openfrontio

# Supervisor logs
docker exec openfrontio cat /var/log/supervisor/supervisord.log

📊 Build Status

Build Status


Note: This Docker image is built from the official OpenFrontIO source code. All game credits go to the OpenFrontIO team and contributors.

Tag summary

Content type

Image

Digest

sha256:4f46393b6

Size

253.4 MB

Last updated

8 months ago

docker pull devedse/openfrontio