From 7567fb8144520adf46cf3776328e800525fa9212 Mon Sep 17 00:00:00 2001 From: "nate@necloud.us" Date: Wed, 2 Jul 2025 10:03:52 -0400 Subject: [PATCH] docker --- Read me.md | 65 +++++++++++++++++++++++++++++++++++++++++++++- docker-compose.yml | 12 +++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/Read me.md b/Read me.md index 6ac59df..0451119 100644 --- a/Read me.md +++ b/Read me.md @@ -1 +1,64 @@ -the spelling game \ No newline at end of file +### Spelling Game ### + +--- + +### 🐳 **How to Clone and Run the Spelling App from Gitea with Docker Compose** + +1. **Install Docker & Docker Compose** + - Mac: [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop/) + - Windows: [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/) + - Linux: Use your package manager (e.g. `apt install docker docker-compose`) + +2. **Clone the Repository** + +```bash +git clone https://git.necloud.us/nmemmert/Spelling.git +cd Spelling +``` + +3. **Build & Start the Container** + +```bash +docker-compose up --build +``` + +This will: +- Build the Docker image using the included `Dockerfile` +- Start the container on port 3000 +- Mount your user data (like `users.json` and `wordlists.json`) so they persist + +4. **Access the App** + +Open your browser and visit: + +``` +http://localhost:3000 +``` + +🎉 You’re in! Log in with a predefined user from `users.json` (e.g., `admin1` / `password`). + +5. **Stop the App** + +To shut it down when you're done: + +```bash +docker-compose down +``` + +--- + +### ✅ Optional: Run in the Background + +```bash +docker-compose up -d +``` + +To stop it later: + +```bash +docker-compose down +``` + +--- + +Want me to generate a `README.md` from this? Or help automate updates with a webhook from your Gitea server? You’re primed for self-hosted greatness. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f9c84ab --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.9" + +services: + spelling-app: + build: . + container_name: spelling-app + ports: + - "3000:3000" + volumes: + - ./public/users.json:/app/public/users.json + - ./public/wordlists.json:/app/public/wordlists.json + restart: unless-stopped