mirror of
https://github.com/PhialsBasement/LibreCrawl.git
synced 2026-10-18 00:19:37 +02:00
Setting ZOHO_OAUTH_ENABLED with a client ID and secret adds a "Login with Zoho" button to the login page. Zoho users are matched by a new users.zoho_id column. An existing account with the same email is linked to Zoho. Otherwise a new verified account is created, unless ZOHO_ALLOW_SIGNUP is off, which is the default when registration is disabled. Also configurable: redirect URI, data-center accounts server, scopes, allowed email domains and the tier for new accounts. All are documented in .env.example and passed through in docker-compose.yml. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
65 lines
2.5 KiB
YAML
65 lines
2.5 KiB
YAML
services:
|
|
librecrawl:
|
|
build: .
|
|
container_name: librecrawl
|
|
ports:
|
|
# In local mode: only localhost (127.0.0.1:5000)
|
|
# In production mode: all interfaces (0.0.0.0:5000) for LAN/WAN access
|
|
- "${HOST_BINDING:-127.0.0.1}:${EXTERNAL_PORT:-5000}:5000"
|
|
volumes:
|
|
# Persist the user database and settings
|
|
- ./data:/app/data
|
|
environment:
|
|
- FLASK_APP=main.py
|
|
- PYTHONUNBUFFERED=1
|
|
# Set to "true" for local mode (no authentication), "false" for production
|
|
# Defaults to "false" — local mode disables all auth and grants admin to everyone
|
|
- LOCAL_MODE=${LOCAL_MODE:-false}
|
|
# Set to "true" to disable new user registrations
|
|
- REGISTRATION_DISABLED=${REGISTRATION_DISABLED:-false}
|
|
# Set to "true" for demo mode (1.5GB per-user memory limit)
|
|
- DEMO_MODE=${DEMO_MODE:-false}
|
|
# DANGEROUS: Set to "true" to allow login as any username with no password
|
|
# (username only used to separate sessions). Do NOT use in production.
|
|
- DANGEROUSLY_SKIP_AUTH=${DANGEROUSLY_SKIP_AUTH:-false}
|
|
# Zoho OAuth login (see .env.example for details)
|
|
- ZOHO_OAUTH_ENABLED=${ZOHO_OAUTH_ENABLED:-false}
|
|
- ZOHO_CLIENT_ID=${ZOHO_CLIENT_ID:-}
|
|
- ZOHO_CLIENT_SECRET=${ZOHO_CLIENT_SECRET:-}
|
|
- ZOHO_REDIRECT_URI=${ZOHO_REDIRECT_URI:-}
|
|
- ZOHO_ACCOUNTS_URL=${ZOHO_ACCOUNTS_URL:-}
|
|
- ZOHO_SCOPES=${ZOHO_SCOPES:-}
|
|
- ZOHO_ALLOWED_DOMAINS=${ZOHO_ALLOWED_DOMAINS:-}
|
|
- ZOHO_ALLOW_SIGNUP=${ZOHO_ALLOW_SIGNUP:-}
|
|
- ZOHO_DEFAULT_TIER=${ZOHO_DEFAULT_TIER:-}
|
|
# Uncomment these for SMTP sending
|
|
# - SMTP_HOST=${SMTP_HOST}
|
|
# - SMTP_PORT=${SMTP_PORT}
|
|
# - SMTP_USER=${SMTP_USER}
|
|
# - SMTP_PASSWORD=${SMTP_PASSWORD}
|
|
# - SMTP_FROM=${SMTP_FROM}
|
|
# - SMTP_FROM_NAME=${SMTP_FROM_NAME}
|
|
# Add this for correct links in the verification emails
|
|
# - MAIN_APP_URL=${MAIN_APP_URL}
|
|
restart: unless-stopped
|
|
command: >
|
|
sh -c "
|
|
FLAGS='';
|
|
if [ \"$$LOCAL_MODE\" = \"true\" ]; then
|
|
FLAGS=\"$$FLAGS --local\";
|
|
fi;
|
|
if [ \"$$REGISTRATION_DISABLED\" = \"true\" ]; then
|
|
FLAGS=\"$$FLAGS --disable-register\";
|
|
fi;
|
|
if [ \"$$DEMO_MODE\" = \"true\" ]; then
|
|
FLAGS=\"$$FLAGS --demo\";
|
|
fi;
|
|
if [ \"$$DANGEROUSLY_SKIP_AUTH\" = \"true\" ]; then
|
|
FLAGS=\"$$FLAGS --dangerously-skip-auth\";
|
|
fi;
|
|
python main.py $$FLAGS"
|
|
|
|
# Increase shared memory size for Chrome to prevent crashes
|
|
shm_size: '2gb'
|
|
|