overleaf-registration/container_to_container/README.md

48 lines
1.6 KiB
Markdown
Raw Normal View History

2024-07-17 12:08:41 +02:00
# A different approach
This approach uses container to container communication. This requires that the bug in /overleaf/services/web/app/src/Features/User/UserRegistrationHandler.js is fixed. see https://github.com/overleaf/overleaf/issues/1206
EmailHandler.promises.sendEmail('registered', {
2024-07-17 12:13:34 +02:00
is missing an await.
2024-07-17 12:08:41 +02:00
await EmailHandler.promises.sendEmail('registered', {
2024-07-17 12:15:30 +02:00
I fixed the file outside of the container and mount it into the overleaf container (i.e. modify compose.yaml) via
2024-07-17 12:08:41 +02:00
volumes:
- /root/overleafserver/UserRegistrationHandler.js:/overleaf/services/web/app/src/Features/User/UserRegistrationHandler.js
# More restrictive
We can block users via the tools/blocked_users.json. And we allow domains for tools/allowed_domains.json for which creation of account is allowed. e.g. uni-bremen.de allows @*.uni-bremen.de and @uni-bremen.de. Furthmore, invited people can also create accounts.
# No google
2024-07-17 12:15:30 +02:00
I replaced the google captcha because of data privacy reasons... Just, kidding I wasn't able to make it run. Thus I replaced it by a python solution.
2024-07-17 12:08:41 +02:00
# How to use this version
2024-07-17 12:15:30 +02:00
Set a secret key in tools/secret_key.json.
2024-07-17 12:08:41 +02:00
2024-07-17 12:15:30 +02:00
Set tools/allowed_domains.json to your needs.
2024-07-17 12:08:41 +02:00
2024-07-17 12:11:26 +02:00
Make sure that in tools/main.py is set correctly for your setup:
container_name_mongo:str = "overleafmongo"
port_mongo: int = 27017
container_name_overleaf: str = "overleafserver"
When you are happy with the setting, run:
make_image.sh
And then
up.sh
2024-07-17 12:08:41 +02:00
2024-07-17 12:15:30 +02:00
Don't forget to set your proxy correctly. An example for nginx see nginx.conf.
2024-07-17 12:13:17 +02:00
2024-07-17 12:08:41 +02:00
A full working setup can be found here https://github.com/davrot/overleaf