Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom nginx configuration #139

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ After modification, you need to restart the container:
docker restart seafile
```

#### Modify Nginx Server Configurations

When building the docker container, use:

```
-e SEAFILE_SERVER_NGINX_CONF_CUSTOM=true
-v <local folder path>:/etc/nginx/sites-enabled
```

#### Find logs

The seafile logs are under `/shared/logs/seafile` in the docker, or `/opt/seafile-data/logs/seafile` in the server that run the docker.
Expand Down
7 changes: 6 additions & 1 deletion scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ def init_letsencrypt():


def generate_local_nginx_conf():
# Now create the final nginx configuratin
custom = get_conf('SEAFILE_SERVER_NGINX_CONF_CUSTOM', 'false')

if custom:
return

# Now create the final nginx configuration
domain = get_conf('SEAFILE_SERVER_HOSTNAME', 'seafile.example.com')
context = {
'https': is_https(),
Expand Down