Sign inSign up

codingjoe/the-box-web:main

Manifest digest

sha256:9c90875f460977d0d7a71c2579ceb21b5db9f3901d64113412b8fab442b5d6e6

Last pushed

7 months by codingjoe

Type

Compose

Manifest digest

sha256:9c90875f460977d0d7a71c2579ceb21b5db9f3901d64113412b8fab442b5d6e6

Compose file content

name: containers
networks:
  app:
    internal: true
    name: containers_app
  app-wan:
    name: containers_app-wan
  caddy:
    external: true
    name: caddy
services:
  web:
    deploy:
      mode: replicated
      replicas: 2
      resources:
        limits:
          cpus: "2"
          memory: 512M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
      update_config:
        delay: 1m
        failure_action: rollback
        monitor: 1m
        order: start-first
        parallelism: 1
    environment:
      HOSTNAME: ${HOSTNAME:-localhost}
      PORT: ${PORT:-8000}
    image: traefik/whoami:latest
    labels:
      - caddy=${HOSTNAME:-localhost}
      - caddy.reverse_proxy={{upstreams ${PORT:-8000}}}
      - caddy.reverse_proxy.lb_policy=round_robin
      - caddy.reverse_proxy.health_uri=/
      - caddy.reverse_proxy.health_headers.X-Forwarded-Host=${HOSTNAME:-localhost}
      - caddy.reverse_proxy.health_headers.X-Forwarded-Proto=https
    networks:
      app: null
      app-wan: null
      caddy: null
    stop_grace_period: 1m

Docker commands

docker compose -f oci://codingjoe/the-box-web:main up

Use the above command to pull and run the Compose file. Learn more.

Images used

Image

Tiny Go webserver that prints OS information and HTTP request to output


Pulls

10M+

Stars

72

Last Updated

about 2 months