# docker-compose.yml

Source: https://zshot-cli.com/reference/docker/files/docker-compose/
Markdown: https://zshot-cli.com/reference/docker/files/docker-compose/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Docker](https://zshot-cli.com/reference/docker/) › [Files](https://zshot-cli.com/reference/docker/files/)

A Compose service running `scaleassembly/zshot-server` with the [recommended runtime settings](/reference/docker/hardening#recommended-runtime-settings). Download it beside [zshot-seccomp.json](/reference/docker/files/zshot-seccomp) and set `ZSHOT_LICENSE`.

Download: https://zshot-cli.com/deploy/docker-compose.yml

```yaml
# zshot server with Chromium's sandbox on and the strictest container settings.
#
#   docker run --rm --entrypoint cat scaleassembly/zshot-server:0.49.1 \
#     /usr/share/zshot/zshot-seccomp.json > zshot-seccomp.json
#   docker compose up -d
#
# Upgrade with `docker compose pull && docker compose up -d`.
services:
  zshot:
    image: ${ZSHOT_IMAGE:-scaleassembly/zshot-server:0.49.1}
    restart: unless-stopped
    ports:
      - "${ZSHOT_PORT:-3000}:3000"
    environment:
      # Your license goes here. Either put ZSHOT_LICENSE=your-key in a .env
      # file beside this one, which Compose reads on its own, or replace the
      # default below with the key.
      ZSHOT_LICENSE: ${ZSHOT_LICENSE:-}
      # Optional: require this bearer token on every request.
      ZSHOT_SERVER_TOKEN_AUTH: ${ZSHOT_SERVER_TOKEN_AUTH:-}
    security_opt:
      - seccomp=./zshot-seccomp.json
      - no-new-privileges=true
    cap_drop: [ALL]
    read_only: true
    tmpfs: [/tmp]
    # Memory and concurrency are in tension: every concurrent render is a
    # browser instance, and video renders need the most. Your workload sets
    # the requirement. See https://zshot-cli.com/reference/flags/server/server-max-concurrency/
    # for sizing per slot.
    deploy:
      resources:
        limits:
          memory: 2g
          pids: 512
```

## Related

Topics:

- [Hardening](https://zshot-cli.com/reference/docker/hardening/) — Recommended runtime settings
- [Raw file](https://zshot-cli.com/deploy/docker-compose.yml)

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
    - [Environment](https://zshot-cli.com/reference/docker/environment/)
    - [Hardening](https://zshot-cli.com/reference/docker/hardening/)
    - [Kubernetes](https://zshot-cli.com/reference/docker/kubernetes/)
    - [Railway](https://zshot-cli.com/reference/docker/railway/)
    - [Files](https://zshot-cli.com/reference/docker/files/)
      - **docker-compose.yml**
      - [zshot-seccomp.json](https://zshot-cli.com/reference/docker/files/zshot-seccomp/)
      - [kubernetes.yml](https://zshot-cli.com/reference/docker/files/kubernetes/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

