Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (52 loc) · 2.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (52 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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}
# 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'