version: "3.7"

services:
  pixivfe:
    container_name: pixivfe
    hostname: pixivfe
    image: vnpower/pixivfe:latest
    restart: unless-stopped
    user: 1000:1000
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    ports:
      - "8282:8282" # Specify `127.0.0.1:8282:8282` instead if using a reverse proxy
    env_file: .env
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://127.0.0.1:8282/about"]
      interval: 30s
      timeout: 3s
      start_period: 15s
      retries: 3
    secrets:
      - pixivfe_token

secrets:
  pixivfe_token:
    # Copy the contents of the `PHPSESSID` cookie into `pixivfe_token.txt`
    # See https://pixivfe.pages.dev/obtaining-pixivfe-token/ for instructions
    file: ./docker/pixivfe_token.txt
