services:
  app:
    image: godoxy-dev
    build:
      context: .
      dockerfile: dev.Dockerfile
    container_name: godoxy-proxy-dev
    restart: unless-stopped
    env_file: dev.env
    environment:
      DOCKER_HOST: unix:///var/run/docker.sock
      TZ: Asia/Hong_Kong
      API_ADDR: 127.0.0.1:8999
      API_USER: dev
      API_PASSWORD: 1234
      API_SKIP_ORIGIN_CHECK: true
      API_JWT_TTL: 24h
      DEBUG: true
      API_JWT_SECRET: 1234567891234567
    labels:
      proxy.exclude: true
      proxy.#1.healthcheck.disable: true
    ipc: host
    network_mode: host
    volumes:
      - ./bin/godoxy:/app/run:ro
      - /var/run/docker.sock:/var/run/docker.sock
      - ./dev-data/config:/app/config
      - ./dev-data/certs:/app/certs
      - ./dev-data/error_pages:/app/error_pages:ro
      - ./dev-data/data:/app/data
      - ./dev-data/logs:/app/logs
      - ~/certs/myCA.pem:/etc/ssl/certs/ca.crt:ro
  parca:
    image: ghcr.io/parca-dev/parca:v0.24.2
    container_name: godoxy-parca
    restart: unless-stopped
    command: [/parca, --config-path, /parca.yaml]
    network_mode: host
    # ports:
    #   - 7070:7070
    configs:
      - source: parca
        target: /parca.yaml
    labels:
      proxy.#1.port: "7070"
  tinyauth:
    image: ghcr.io/steveiliop56/tinyauth:v3
    container_name: tinyauth
    restart: unless-stopped
    environment:
      - SECRET=12345678912345671234567891234567
      - APP_URL=https://tinyauth.my.app
      - USERS=user:$$2a$$10$$UdLYoJ5lgPsC0RKqYH/jMua7zIn0g9kPqWmhYayJYLaZQ/FTmH2/u # user:password
    labels:
      proxy.tinyauth.port: "3000"
configs:
  parca:
    content: |
      object_storage:
        bucket:
          type: "FILESYSTEM"
          config:
            directory: "./data"
      scrape_configs:
        - job_name: "parca"
          scrape_interval: "1s"
          static_configs:
            - targets: [ 'localhost:7777' ]
