This project is a modernized version of the Space Invaders classic, featuring a dynamic high-score system backed by PocketBase.
PocketBase is a single-file Go backend that provides a database (SQLite), REST API, and authentication, making it ideal for simple, self-hosted applications.
server.js)You must have the following installed:
To run the scoreboard, you must run a separate PocketBase instance first, or modify your Dockerfile for a multi-service setup. For simplicity, we assume an accessible instance:
Start PocketBase: Download and run the PocketBase executable (e.g., on port 8090).
Create Collections: Use the PocketBase Admin UI to create a scores collection with fields like username (string) and score (number).
Update .env: Create a .env file in the root of the project to specify the API location:
# Example .env file
POCKETBASE_URL="http://your-server-ip:8090"
PORT=3009
(Note: This file is excluded by .gitignore for security)
Build the Docker Image:
docker build -t m-space-invaders .
Run the Container:
docker run -d --name m_space-invaders -p 3009:3009 m-space-invaders
The game will be accessible in your web browser at http://localhost:3009.
This image is available publicly on Docker Hub under the deewhy namespace:
docker pull deewhy/m-space-invaders:latest
Content type
Image
Digest
sha256:89484bcc1…
Size
45 MB
Last updated
about 1 year ago
docker pull deewhy/m-space-invaders