mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-01-27 04:40:52 +03:00
docs: add Docker bind mount vs named volume permission guidance
- Add new section 'Docker Volume Types and Permissions' - Explain difference between named volumes and bind mounts - Provide solution for bind mount permission issues (UID 1001) - Clarify why named volumes are recommended and used in official docker-compose.yml - Address SQLite permission errors in Docker environments using bind mounts Addresses issue reported by user using bind mounts in Portainer.
This commit is contained in:
30
README.md
30
README.md
@@ -513,6 +513,36 @@ Try the following steps:
|
|||||||
>
|
>
|
||||||
> This setup provides a complete containerized deployment for the Gitea Mirror application.
|
> This setup provides a complete containerized deployment for the Gitea Mirror application.
|
||||||
|
|
||||||
|
#### Docker Volume Types and Permissions
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Named Volumes vs Bind Mounts**: If you encounter SQLite permission errors even when using Docker, check your volume configuration:
|
||||||
|
|
||||||
|
**✅ Named Volumes (Recommended):**
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- gitea-mirror-data:/app/data # Docker manages permissions automatically
|
||||||
|
```
|
||||||
|
|
||||||
|
**⚠️ Bind Mounts (Requires Manual Permission Setup):**
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- /host/path/to/data:/app/data # Host filesystem permissions apply
|
||||||
|
```
|
||||||
|
|
||||||
|
**If using bind mounts**, ensure the host directory is owned by UID 1001 (the `gitea-mirror` user):
|
||||||
|
```bash
|
||||||
|
# Set correct ownership for bind mount
|
||||||
|
sudo chown -R 1001:1001 /host/path/to/data
|
||||||
|
sudo chmod -R 755 /host/path/to/data
|
||||||
|
```
|
||||||
|
|
||||||
|
**Why named volumes work better:**
|
||||||
|
- Docker automatically handles permissions
|
||||||
|
- Better portability across different hosts
|
||||||
|
- No manual permission setup required
|
||||||
|
- Used by our official docker-compose.yml
|
||||||
|
|
||||||
|
|
||||||
#### Database Maintenance
|
#### Database Maintenance
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user