Blame
|
1 | # Census-server |
||||||
|
2 | |||||||
| 3 | ## compose.yml |
|||||||
|
4 | ```yaml |
||||||
|
5 | --- |
||||||
|
6 | services: |
||||||
| 7 | census-server: |
|||||||
| 8 | image: ghcr.io/selfhosters-cc/container-census:latest |
|||||||
| 9 | container_name: census-server |
|||||||
| 10 | restart: unless-stopped |
|||||||
| 11 | group_add: |
|||||||
| 12 | - "${DOCKER_GID:-999}" |
|||||||
| 13 | ||||||||
| 14 | ports: |
|||||||
| 15 | - "8080:8080" |
|||||||
| 16 | ||||||||
| 17 | volumes: |
|||||||
| 18 | # Docker socket for scanning local containers |
|||||||
| 19 | - /var/run/docker.sock:/var/run/docker.sock |
|||||||
| 20 | ||||||||
| 21 | # Persistent data directory (database, settings, scans) |
|||||||
| 22 | - ./census/server:/app/data |
|||||||
| 23 | ||||||||
| 24 | environment: |
|||||||
| 25 | # Server Configuration (optional, defaults shown) |
|||||||
| 26 | # SERVER_HOST: "0.0.0.0" |
|||||||
| 27 | # SERVER_PORT: "8080" |
|||||||
| 28 | # DATABASE_PATH: "./data/census.db" |
|||||||
| 29 | ||||||||
| 30 | # Authentication (optional, disabled by default) |
|||||||
| 31 | # AUTH_ENABLED: "false" |
|||||||
| 32 | # AUTH_USERNAME: "your_username" |
|||||||
| 33 | # AUTH_PASSWORD: "your_secure_password" |
|||||||
| 34 | # SESSION_SECRET: "change-me-in-production" # Required if AUTH_ENABLED=true |
|||||||
| 35 | ||||||||
| 36 | # Timezone for telemetry reporting |
|||||||
| 37 | TZ: ${TZ:-UTC} |
|||||||
| 38 | ||||||||
| 39 | healthcheck: |
|||||||
| 40 | test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/health"] |
|||||||
| 41 | interval: 30s |
|||||||
| 42 | timeout: 3s |
|||||||
| 43 | retries: 3 |
|||||||
| 44 | start_period: 10s |
|||||||
| 45 | ``` |
|||||||
