Sign inSign up

codingjoe/the-box-web:latest

Manifest digest

sha256:661516cc75e3e425058844908bf40fbd871026c11ecf334aef2c43d5b375fc25

Last pushed

7 months by codingjoe

Type

Compose

Manifest digest

sha256:661516cc75e3e425058844908bf40fbd871026c11ecf334aef2c43d5b375fc25

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:latest 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