-
Notifications
You must be signed in to change notification settings - Fork 936
Add support of overleaf as community container #6914
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
Draft
docjyJ
wants to merge
1
commit into
main
Choose a base branch
from
ench/noid/overleaf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| { | ||
| "aio_services_v1": [ | ||
| { | ||
| "container_name": "nextcloud-aio-overleaf-redis", | ||
| "display_name": "Overleaf Redis", | ||
| "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf", | ||
| "image": "redis", | ||
| "image_tag": "7", | ||
| "internal_port": "6379", | ||
| "restart": "unless-stopped", | ||
| "expose": [ | ||
| "6379" | ||
| ], | ||
| "environment": [ | ||
| "TZ=%TIMEZONE%" | ||
| ], | ||
| "volumes": [ | ||
| { | ||
| "source": "nextcloud_aio_overleaf_redis", | ||
| "destination": "/data", | ||
| "writeable": true | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "container_name": "nextcloud-aio-overleaf-mongo", | ||
| "display_name": "Overleaf MongoDB", | ||
| "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf", | ||
| "image": "mongo", | ||
| "image_tag": "5", | ||
| "internal_port": "27017", | ||
| "restart": "unless-stopped", | ||
| "expose": [ | ||
| "27017" | ||
| ], | ||
| "environment": [ | ||
| "TZ=%TIMEZONE%" | ||
| ], | ||
| "volumes": [ | ||
| { | ||
| "source": "nextcloud_aio_overleaf_mongo", | ||
| "destination": "/data/db", | ||
| "writeable": true | ||
| } | ||
| ], | ||
| "backup_volumes": [ | ||
| "nextcloud_aio_overleaf_mongo" | ||
| ] | ||
| }, | ||
| { | ||
| "container_name": "nextcloud-aio-overleaf", | ||
| "display_name": "Overleaf", | ||
| "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf", | ||
| "image": "sharelatex/sharelatex", | ||
| "image_tag": "latest", | ||
| "internal_port": "80", | ||
| "restart": "unless-stopped", | ||
| "depends_on": [ | ||
| "nextcloud-aio-overleaf-mongo", | ||
| "nextcloud-aio-overleaf-redis" | ||
| ], | ||
| "ports": [ | ||
| { | ||
| "ip_binding": "%APACHE_IP_BINDING%", | ||
| "port_number": "8050", | ||
| "protocol": "tcp" | ||
| } | ||
| ], | ||
| "environment": [ | ||
| "TZ=%TIMEZONE%", | ||
| "SHARELATEX_MONGO_URL=mongodb://nextcloud-aio-overleaf-mongo:27017/sharelatex", | ||
| "SHARELATEX_REDIS_HOST=nextcloud-aio-overleaf-redis", | ||
| "SHARELATEX_REDIS_PORT=6379", | ||
| "SHARELATEX_APP_NAME=Overleaf" | ||
| ], | ||
| "volumes": [ | ||
| { | ||
| "source": "nextcloud_aio_overleaf", | ||
| "destination": "/var/lib/sharelatex", | ||
| "writeable": true | ||
| } | ||
| ], | ||
| "backup_volumes": [ | ||
| "nextcloud_aio_overleaf", | ||
| "nextcloud_aio_overleaf_mongo" | ||
| ], | ||
| "nextcloud_exec_commands": [ | ||
| "echo 'Installing integration_overleaf app...'", | ||
| "php /var/www/html/occ app:install integration_overleaf", | ||
| "php /var/www/html/occ app:enable integration_overleaf", | ||
| "echo 'Configuring integration_overleaf base_url...'", | ||
| "php /var/www/html/occ config:app:set integration_overleaf base_url --value 'http://%NC_DOMAIN%:8050'" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| ## Overleaf (Community Edition) | ||
| This community container deploys Overleaf CE with its required MongoDB and Redis services. | ||
|
|
||
| ### Notes | ||
| - After adding and starting the container, you can directly visit http://ip.address.of.server:8050/ to access your new Overleaf instance. | ||
| - To access Overleaf outside your local network with HTTPS, set up a reverse proxy in front of AIO. You can either follow the generic reverse proxy guide: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md or use the community Caddy container which can be adjusted to forward a subdomain like `overleaf.$NC_DOMAIN` to port 8050 on this server. | ||
| - Initial user/admin creation is handled inside Overleaf. This container does not integrate Overleaf authentication with Nextcloud users. | ||
| - If you run a firewall (e.g., ufw), ensure port 8050 is allowed or that your reverse proxy can reach it locally. | ||
| - The data directories for Overleaf and MongoDB are persisted and included in AIO backups automatically. | ||
| - See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers for how to add it to the AIO stack. | ||
|
|
||
| ### Nextcloud integration (auto-config) | ||
| When this container is added, AIO automatically: | ||
| - Installs and enables the Nextcloud app `integration_overleaf`. | ||
| - Sets its `base_url` to `http://%NC_DOMAIN%:8050` by default (reachable when accessing the server directly). | ||
|
|
||
| If you publish Overleaf behind a reverse proxy on a subdomain (recommended), change the URL in Nextcloud accordingly, for example: | ||
| ```bash | ||
| sudo docker exec --user www-data -it nextcloud-aio-nextcloud php /var/www/html/occ config:app:set integration_overleaf base_url --value "https://overleaf.%NC_DOMAIN%" | ||
| ``` | ||
|
|
||
| ### Data and backups | ||
| - Overleaf data: stored in the volume `nextcloud_aio_overleaf` (mounted at `/var/lib/sharelatex`). | ||
| - MongoDB data: stored in the volume `nextcloud_aio_overleaf_mongo` (mounted at `/data/db`). | ||
| - Both are included in AIO backup/restore. Redis data is ephemeral by design and not included. | ||
|
|
||
| ### Advanced configuration | ||
| - The container uses the official `sharelatex/sharelatex` image and configures minimal required environment variables (MongoDB/Redis/Time zone). You can adjust Overleaf settings from the web UI afterwards. | ||
| - If you plan to expose Overleaf publicly, consider setting up rate-limiting and fail2ban in front of it. See the community Fail2ban container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/fail2ban | ||
|
|
||
| ### Repository | ||
| https://github.com/overleaf/overleaf | ||
|
|
||
| ### Maintainer | ||
| https://github.com/docjyj |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this main container should be the first because IIRC we use the first displayname for the checkbox for the community container in the AIO interface...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is AI generated, I need to read the documentation. Thank you, I'll take note of that.
This week-end, the noise was too much. thats why it in draft.