-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (73 loc) · 2.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (73 loc) · 2.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-panopticon}
POSTGRES_USER: ${POSTGRES_USER:-panopticon}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
volumes: [pg_data:/var/lib/postgresql/data]
healthcheck:
test: [CMD-SHELL, 'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"']
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: [redis-server, --save, '', --appendonly, 'no', --maxmemory, 128mb, --maxmemory-policy, allkeys-lru]
healthcheck:
test: [CMD, redis-cli, ping]
interval: 10s
timeout: 3s
retries: 5
shooter:
build: ./shooter
restart: unless-stopped
environment:
TZ: ${TZ:-UTC}
SHOTS_DIR: /data/screenshots
SHOT_WIDTH: ${SHOT_WIDTH:-1280}
SHOT_HEIGHT: ${SHOT_HEIGHT:-800}
SHOT_QUALITY: ${SHOT_QUALITY:-72}
SHOT_THUMB_WIDTH: ${SHOT_THUMB_WIDTH:-360}
SHOT_TIMEOUT_MS: ${SHOT_TIMEOUT_MS:-25000}
SHOT_SETTLE_MS: ${SHOT_SETTLE_MS:-1800}
SHOT_VIDEO_WAIT_MS: ${SHOT_VIDEO_WAIT_MS:-6000}
SHOT_CHALLENGE_WAIT_MS: ${SHOT_CHALLENGE_WAIT_MS:-15000} # attesa massima di una verifica antibot, per tentativo
SHOT_USER_AGENT: ${SHOT_USER_AGENT:-} # vuoto = Chrome vero con la versione del browser in uso
volumes: [screenshots:/data/screenshots]
api:
build: {context: ., dockerfile: api/Dockerfile}
restart: unless-stopped
env_file: .env
environment: &app-environment
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-panopticon}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-panopticon}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?Set ADMIN_PASSWORD in .env}
JWT_SECRET: ${JWT_SECRET:?Set JWT_SECRET in .env}
volumes:
- packages:/data/packages # zip di plugin/temi a licenza caricati in Sentinel
- connectors:/data/connectors
- branding:/data/branding
- screenshots:/data/screenshots:ro
ports: ['${BIND_ADDRESS:-127.0.0.1}:${HOST_PORT:-8810}:8080']
depends_on:
postgres: {condition: service_healthy}
redis: {condition: service_healthy}
worker:
build: {context: ., dockerfile: api/Dockerfile}
restart: unless-stopped
command: [arq, app.worker.WorkerSettings]
env_file: .env
environment: *app-environment
volumes: [branding:/data/branding:ro, screenshots:/data/screenshots:ro, packages:/data/packages:ro] # istantanee prima/dopo per i report
depends_on:
postgres: {condition: service_healthy}
redis: {condition: service_healthy}
shooter: {condition: service_started}
volumes:
pg_data:
screenshots:
connectors:
branding:
packages: