Fixes for site

This commit is contained in:
2026-02-03 13:49:49 -05:00
parent 403d015dbe
commit c2e7ed01b4
9 changed files with 346 additions and 82 deletions

View File

@@ -29,10 +29,12 @@ This is the best way to run the Web Dashboard on a server using Portainer.
### 1. Git Setup
1. Create a new Git repository (GitHub/GitLab).
- For local servers like Gitea, your URL will be something like `http://10.0.0.102:3000/thethreemagi/bookapp.git`.
2. Push this project code to the repository.
- **IMPORTANT:** Ensure `.env`, `token.json`, `credentials.json`, and the `data/` folder are in your `.gitignore`. Do **not** commit secrets to the repo.
### 2. Server Preparation (One-Time Setup)
Since secrets and database files shouldn't be in Git, you need to place them on your server manually.
1. **Authenticate Locally:** Run the app on your PC first (`python wizard.py`) to generate the `token.json` file (Google Login).
@@ -49,14 +51,19 @@ Since secrets and database files shouldn't be in Git, you need to place them on
1. Log in to **Portainer**.
2. Go to **Stacks** > **Add stack**.
3. Select **Repository**.
- **Repository URL:** `<your-git-repo-url>`
- **Repository URL:** `http://10.0.0.102:3000/thethreemagi/bookapp.git`
- **Compose path:** `docker-compose.yml`
4. Under **Environment variables**, add the following:
4. **Enable Authentication:** Since your Gitea repository is private, you will need to provide credentials.
- Toggle on **Authentication**.
- **Username:** Your Gitea username (`thethreemagi`).
- **Password:** Use a **Personal Access Token** from Gitea, not your actual password.
- In Gitea, go to your **User Settings > Applications** and generate a new token with repository read access.
5. Under **Environment variables**, add the following:
- `HOST_PATH`: `/opt/bookapp` (The folder you created in Step 2)
- `GEMINI_API_KEY`: `<your-api-key>`
- `ADMIN_PASSWORD`: `<secure-password-for-web-ui>`
- `FLASK_SECRET_KEY`: `<random-string>`
5. Click **Deploy the stack**.
6. Click **Deploy the stack**.
Portainer will pull the code from Git, build the image, and mount the secrets/data from your server folder.