- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docker-compose-firstlaunch.yml | ||
| docker-compose.yml | ||
| nginx.conf | ||
| README.md | ||
| seahub_settings.py | ||
| stack.env | ||
Seafile-CE
Seafile CE 13.0 stack — deployed via Portainer CE
Prerequisites
Secret files
Create on the host before first deploy:
mkdir -p /share/docker_secrets/seafile-ce
openssl rand -hex 32 > /share/docker_secrets/seafile-ce/db_root_password.txt
chmod 600 /share/docker_secrets/seafile-ce/db_root_password.txt
NPM proxy host
Create in NPM:
Domain: cloud.necc.me Forward to: http://seafile:80 Custom location:
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://seafile:8082;
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
proxy_request_buffering off;
}
Deploy (Portainer CE 2.45)
Stacks → Add Stack Name: seafile-ce Repository URL: https://git.necc.me/necc/seafile-ce Branch: main Environment file: stack.env -> copy it's contents and use your own settings! Deploy the stack
Post-deploy: seahub_settings.py
The repo contains conf/seahub_settings.py with OAuth (authentik) and FILE_SERVER_ROOT / SERVICE_URL settings.
After the container has started at least once (so the /shared/seafile/conf/ directory exists on the host), append the contents of seahub_settings.py. Restart seafile-server.
Verify
curl -k https://cloud.necc.me/seafhttp/protocol-version
Expected: {"version": 2}
curl -k https://cloud.necc.me/api2/auth-token/
Expected: {"error": "...", "error_msg": "..."} (any JSON response = Seahub is up)
Optional:
After deploying, seafile-server no longer requires the root password for the database, you are safe to remove it from your env file.
Update:
There seems to be a bug in image: seafileltd/seafile-mc:13.0-latest, this is an attempt to fix it, temporarily. Example nginx.conf added.
Symptom: nginx: [emerg] open() "/etc/nginx/off" failed (13: Permission denied)
Check for value error_log off; in:
docker exec seafile-server cat /etc/nginx/nginx.conf
| Line | Before | After |
|---|---|---|
error_log |
error_log off; |
error_log /var/log/nginx/error.log; |
| Default server | (no server_name) | server_name _; |