2025-11-17 16:28:40 -08:00
2025-11-17 16:28:40 -08:00
2025-10-31 15:43:22 -07:00
2025-11-04 14:43:37 -08:00
2025-11-05 06:34:44 -08:00
2025-11-05 06:34:44 -08:00
2025-11-05 06:34:44 -08:00
2025-11-04 15:00:44 -08:00
2025-11-04 15:00:44 -08:00
2024-07-23 09:49:47 -07:00
2025-11-10 15:22:05 -08:00
2025-11-04 15:00:44 -08:00

Env. Vars

DUPLICATE_BILL_TO_VENDOR => If set to true, a copy of the bill will be sent to Vendors/{Vendor Name}/{Invoice Number}/{filename.extension}. Default to false.

MEDIA_PATH => Must match the mount directory of the volume. e.g. volumes: - ~:/root - "/Users/pfic/Desktop/ISM:/media" environment: - MEDIA_PATH=/media

IMS_TOKEN => This will be validated on every request. If it is not sent, the request will be rejected.

Operations

Bills

By default, it will query from the job files. Anything duplicated to the vendor files is purely for reference. If an invoice number is included, it will be default fetch that file only.

When looking at the bills, it will look in the bills folder of the job for an invoice that has a name that includes the invoice number. If not found, it will not show anythign. Deleting the bill or job will not delete the media.

Batch file has to be included with partner. Reg file has to be run in order for it to work.

Caddy is used as a reverse HTTPS proxy so that CORS does not block requests. This must sit in the same dir as the docker-compose.yml file.

domain.com {
reverse_proxy ims:8000
}

Sample Docker Compose file

version: '2'

services: 
  traefik:
    container_name: traefik-ims
    image: traefik:latest
    restart: always
    init: true
    command: # CLI arguments
      - --global.checkNewVersion=true
      - --global.sendAnonymousUsage=false
      - --entrypoints.https.address=:10443
      - --entrypoints.https.forwardedHeaders.trustedIPs=173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/12,172.64.0.0/13,131.0.72.0/22,2400:cb00::/32,2606:4700::/32,2803:f800::/32,2405:b500::/32,2405:8100::/32,2a06:98c0::/29,2c0f:f248::/32
      - --log=true
      - --log.level=ERROR # (Default: error) DEBUG, INFO, WARN, ERROR, FATAL, PANIC
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --providers.docker.network=traefik_proxy
      - --certificatesResolvers.dns-cloudflare.acme.email=cloudflare@thinkimex.com
      - --certificatesResolvers.dns-cloudflare.acme.storage=/acme.json
      - --certificatesResolvers.dns-cloudflare.acme.keyType=EC384
      - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.provider=cloudflare
      - --certificatesresolvers.dns-cloudflare.acme.dnschallenge.resolvers=1.1.1.1:53,1.0.0.1:53,2606:4700:4700::1111:53,2606:4700:4700::1001:53
      - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.delayBeforeCheck=90 # To delay DNS check and reduce LE hitrate
    networks:
      traefik_proxy:
        ipv4_address: 192.168.90.254
    ports:
      - target: 10443
        published: 10443
        protocol: tcp
        mode: host
    environment:
      - TZ=America/Vancouver
      - CF_API_EMAIL=cloudflare@thinkimex.com
      - CF_DNS_API_TOKEN=b8BWRbkJckVK0IG6600Iq5AYx4HYZ7dLzDWUOZ2D
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - /home/imex/ims/traefik/acme/acme.json:/acme.json # cert location - you must touch this file and change permissions to 600
    labels:
      - "traefik.enable=false"
  cf-ddns:
    container_name: cf-ddns
    image: oznu/cloudflare-ddns:latest
    networks:
      - traefik_proxy
    restart: always
    environment:
      - API_KEY=b8BWRbkJckVK0IG6600Iq5AYx4HYZ7dLzDWUOZ2D
      - ZONE=imexmedia.ca
      - SUBDOMAIN=fastrack
      - PROXIED=false
      - RRTYPE=A
      - DELETE_ON_STOP=false
      - DNS_SERVER=1.1.1.1
    labels:
      - "traefik.enable=false"
  ims:
    container_name: ims
    networks:
      - traefik_proxy
    volumes:
      - /mnt/ims:/media
    environment:
      - MEDIA_PATH=/media
      - DUPLICATE_BILL_TO_VENDOR=true
      - IMS_TOKEN=6Q9pjF5wFQ2grGyom2rvRPXnkKZDA3BvfNK2J5qQXVuyxTFhjHVX6zwWeYDw3GLAk
      - CONVERT_QUALITY=0.8
      - KEEP_CONVERTED_ORIGINALS=TRUE
    image: imexonline/media-server:latest
    restart: always
    labels:
      - "traefik.enable=true"
      # HTTP Routers
      - "traefik.http.routers.ims-rtr.entrypoints=https"
      - "traefik.http.routers.ims-rtr.rule=Host(`fastrack.imexmedia.ca`)"
      - "traefik.http.routers.ims-rtr.tls.certresolver=dns-cloudflare"
      ## HTTP Services
      - "traefik.http.routers.ims-rtr.service=ims-svc"
      - "traefik.http.services.ims-svc.loadbalancer.server.port=8000"
  dozzle:
    container_name: logs
    image: amir20/dozzle:latest
    restart: always
    networks:
      - traefik_proxy
    ports:
      - "8080:8080"
    security_opt:
      - no-new-privileges:true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      DOZZLE_LEVEL: info
      DOZZLE_TAILSIZE: 300
      DOZZLE_FILTER: "status=running"
      DOZZLE_NO_ANALYTICS: "true"
  watchtower:
    container_name: watchtower-ims
    image: containrrr/watchtower
    networks:
      - traefik_proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - TZ=America/Vancouver
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_REMOVE_VOLUMES=true
      - WATCHTOWER_INCLUDE_STOPPED=true
      - WATCHTOWER_INCLUDE_RESTARTING=true
      - WATCHTOWER_NO_STARTUP_MESSAGE=false
      - WATCHTOWER_REVIVE_STOPPED=true
      - WATCHTOWER_ROLLING_RESTART=true
      - WATCHTOWER_TIMEOUT=60s
      - WATCHTOWER_POLL_INTERVAL=3600
    restart: unless-stopped
    labels:
      - "traefik.enable=false"

networks:
  traefik_proxy:
    name: traefik_proxy
    driver: bridge
    ipam:
      config:
        - subnet: 192.168.90.0/24
Description
No description provided
Readme 450 KiB