Skip to content

Commit 3f3df65

Browse files
authored
docs(testing): setup guide (#32)
* docs(testing): add local testing environment doc * docs(testing): add testing sidebar
1 parent fb8b2bf commit 3f3df65

2 files changed

Lines changed: 107 additions & 0 deletions

File tree

docs/testing/testing-setup.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: Beta Testing Setup
3+
unlisted: true
4+
---
5+
6+
# Beta Testing Setup
7+
8+
Thank you for helping us test the latest features! This guide will help you set up a **local testing environment** that stays completely separate from your "real" book library.
9+
10+
## 📦 Prerequisites
11+
12+
Before you start, you need to have [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) installed on your computer.
13+
14+
## 🚀 Setup Guide
15+
16+
### **Step 1. Create a Sandbox Folder**
17+
18+
To prevent any risk to your actual data, create a brand new folder on your computer (e.g., `booklore-test`). Do all your work inside this folder.
19+
20+
### **Step 2. Prepare Configuration Files**
21+
22+
Copy your existing `.env` and `docker-compose.yml` files into this new sandbox folder.
23+
24+
:::info[For new users]
25+
Follow Steps 1–3 in the [Installation Guide](docs/installation.md#-installation-steps) to create these files from scratch.
26+
:::
27+
28+
### **Step 3. Modify `docker-compose.yml`**
29+
30+
Open the `docker-compose.yml` file in your sandbox folder using a text editor (Notepad, TextEdit, VS Code) and apply these changes:
31+
32+
#### **A. Point to the Latest Pre-release Image:**
33+
34+
Find the line starting with `image:` and update it with the latest `develop-` tag provided by the team at https://github.com/booklore-app/booklore/pkgs/container/booklore/
35+
36+
```yaml
37+
booklore:
38+
image: booklore/booklore:develop-2f6e8570
39+
# Alternative: ghcr.io/booklore-app/booklore:develop-2f6e8570
40+
```
41+
42+
#### **B. Avoid Container Conflicts:**
43+
44+
To prevent your computer from getting confused between your "real" Booklore and this "test" version, you must give the `container_name` a unique name.
45+
46+
```yaml
47+
booklore:
48+
container_name: booklore-test
49+
50+
mariadb:
51+
container_name: mariadb-test
52+
```
53+
54+
### **Step 4. Launch Test Environment**
55+
56+
Open your terminal or command prompt inside your sandbox folder and run:
57+
`docker compose up -d`
58+
59+
**Access the app at:** [http://localhost:6060](http://localhost:6060)
60+
61+
---
62+
63+
## 🔧 Troubleshooting
64+
65+
| Error Message | Solution |
66+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------ |
67+
| "container name is already in use" | Ensure your test containers have a unique name. Refer to Step 3B. |
68+
| "port is already allocated" | Your "real" Booklore (or another app) is likely still running. Stop it and try `docker compose up -d` again. |
69+
70+
### Checking Logs
71+
72+
If the app doesn't start or crashes, the logs will tell us why. Run these in your terminal:
73+
74+
- **Booklore Logs:** `docker compose logs booklore`
75+
- **Database Logs:** `docker compose logs mariadb`
76+
77+
### Resetting the Test Database
78+
79+
As a last resort, if the testing data becomes corrupted and you want a fresh start:
80+
81+
:::danger[Database Reset Warning]
82+
This deletes all library metadata inside your testing environment. Books remain but need re-importing.
83+
:::
84+
85+
1. Stop the containers: Run `docker compose down -v`
86+
2. Delete the folder: `./mariadb/config` (inside your test directory)
87+
3. Restart: `docker compose up -d`
88+
89+
---
90+
91+
## 💡 Tester Tips
92+
93+
- **Isolate Instances:** We strongly recommend stopping your "real" Booklore instance while testing the "Beta" version. This prevents confusion and keeps your computer's resources focused on the test.
94+
- **Small Batches:** Don't import your whole library at once. Test the new features with 5–10 books first to ensure everything is stable.

sidebars.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@ const sidebars: SidebarsConfig = {
141141
],
142142
},
143143
],
144+
145+
// Testing sidebar
146+
testingSidebar: [
147+
{
148+
type: 'category',
149+
label: 'Booklore Beta Testing',
150+
collapsible: true,
151+
collapsed: false,
152+
items: [
153+
'testing/testing-setup',
154+
],
155+
},
156+
],
144157
};
145158

146159
export default sidebars;

0 commit comments

Comments
 (0)