Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.

Commit 564f905

Browse files
authored
Add files via upload
1 parent b60b0c4 commit 564f905

File tree

1 file changed

+185
-0
lines changed

1 file changed

+185
-0
lines changed
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Installing Specify 7 Locally
2+
3+
Everything in one place so you can paste straight into GitHub.
4+
5+
---
6+
7+
## 1) Install required software
8+
9+
- VS Code IDE
10+
- DBeaver CE
11+
- Docker + Docker Compose (plugin)
12+
- Git
13+
- (Optional) MySQL via CLI
14+
15+
> **Optional MySQL via CLI:** only if you want a local server outside Docker.
16+
> macOS (Homebrew): `brew install mysql`
17+
> Ubuntu/Debian: `sudo apt-get update && sudo apt-get install -y mysql-server`
18+
19+
---
20+
21+
## 2) Clone the Specify 7 repo
22+
23+
```bash
24+
git clone https://github.com/specify/specify7.git
25+
```
26+
> `git clone` checks out the **main** branch by default.
27+
28+
---
29+
30+
## 3) Check out the requested tag
31+
32+
Open a terminal in VS Code (or any shell) and run:
33+
34+
```bash
35+
cd specify7
36+
git checkout tags/v7.8.6
37+
```
38+
39+
---
40+
41+
## 4) Python virtual environment + dependencies
42+
43+
Set up a Python venv and install dependencies:
44+
45+
```bash
46+
# Create a venv
47+
python3 -m venv specify7/ve
48+
49+
# Activate it (macOS/Linux)
50+
source specify7/ve/bin/activate
51+
# On Windows (PowerShell) use:
52+
# .\specify7\ve\Scripts\Activate.ps1
53+
54+
# Install deps
55+
pip3 install wheel
56+
pip3 install --upgrade -r requirements.txt
57+
```
58+
> The app runs in Docker. This venv is just for helper scripts.
59+
60+
---
61+
62+
## 5) Get a seed database
63+
64+
Download a database from the Specify test panel. Prefer:
65+
- `ciscollections_2025_02_10_4__2025_08_22`
66+
- `KUBirds_2024_06_06_2_2025_08_05`
67+
68+
Then:
69+
70+
1. Open the downloaded `.sql` in an editor.
71+
2. **Remove** the line:
72+
```sql
73+
USE database 'db_name';
74+
```
75+
3. Save the file.
76+
4. Move it into the repo under:
77+
```
78+
seed_database/
79+
```
80+
> Removing `USE ...;` avoids importing into the wrong DB name.
81+
82+
---
83+
84+
## 6) Configure DBeaver (MySQL/MariaDB)
85+
86+
In **DBeaver**: **Database → New Connection → MySQL** (or **MariaDB**).
87+
88+
Fill exactly:
89+
90+
- **Server Host:** `localhost`
91+
- **Port:** `3306`
92+
- **Database:** `ciscollections_2025_02_10_4__2025_08_22` *(or the DB you downloaded)*
93+
- **Show all databases:** ✅ checked
94+
- **Username:** `root`
95+
- **Password:** your root password (must match `MYSQL_ROOT_PASSWORD` below)
96+
97+
Click **Test Connection** (optional) → **Finish**.
98+
99+
> Screenshot included in this repo-friendly path:
100+
>
101+
> ![DBeaver connection settings](docs/dbeaver-connection.png)
102+
103+
---
104+
105+
## 7) Edit the project `.env`
106+
107+
Open the project’s `.env` and set:
108+
109+
```dotenv
110+
MYSQL_ROOT_PASSWORD=root_pw_here
111+
DATABASE_NAME=db_name_downloaded_locally
112+
MASTER_NAME=master_name_here
113+
MASTER_PASSWORD=master_pw_here
114+
```
115+
116+
- `DATABASE_NAME` must match the seed DB you intend to use (e.g., `ciscollections_2025_02_10_4__2025_08_22`).
117+
- Save the file.
118+
119+
---
120+
121+
## 8) Run Specify 7
122+
123+
From the repo root:
124+
125+
```bash
126+
docker compose up --build
127+
```
128+
129+
Open the app:
130+
131+
- http://localhost/specify
132+
133+
Login:
134+
135+
- **Username:** `spadmin`
136+
- **Password:** `test user`
137+
138+
Select any collection from the drop-down.
139+
140+
---
141+
142+
## 9) Troubleshooting
143+
144+
### Access denied / DB not found after `docker compose up --build`
145+
146+
Do this:
147+
148+
1. In Docker Desktop, delete all containers and images related to this project.
149+
2. Prune old images/volumes:
150+
```bash
151+
# CAUTION: removes unused images/volumes. You will lose local DB volumes.
152+
docker image prune -a
153+
docker volume prune -a
154+
```
155+
3. Rebuild:
156+
```bash
157+
docker compose up --build
158+
```
159+
4. If needed, verify inside the DB container:
160+
```bash
161+
# In Docker Desktop: open the 'mariadb' container → Exec → bash
162+
bash
163+
mysql -uroot -proot # replace 'root' with your actual MYSQL_ROOT_PASSWORD
164+
SHOW DATABASES;
165+
USE db_name; # use the same name you set in DATABASE_NAME
166+
```
167+
5. Back in VS Code terminal, you can re-run:
168+
```bash
169+
docker compose up --build
170+
```
171+
172+
### DBeaver shows “Unknown database”
173+
174+
- Ensure the **Database** field equals your `.env` `DATABASE_NAME`.
175+
- Confirm the `.sql` file didn’t have a `USE ...;` line.
176+
- Make sure the `.sql` was placed in `seed_database/` before the first run.
177+
178+
---
179+
180+
## 10) Notes
181+
182+
- App URL: http://localhost/specify
183+
- Repo: https://github.com/specify/specify7
184+
- Common test login: `spadmin` / `test user`
185+
- If you installed a local MySQL server instead of Docker, mirror the same credentials and DB name in DBeaver and `.env`.

0 commit comments

Comments
 (0)