summaryrefslogtreecommitdiff
path: root/playbooks/roles/oci/templates/stacks/docker-compose.yml
blob: 8b40356ac8a4c8179d5b351e5ffa91ba6c33f0ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
services:
  valkey:
    image: valkey/valkey:8.0.2
    networks:
      - oci

  oci:
    image: ghcr.io/simple-registry/simple-registry:main
    command: "server"
    volumes:
      - {{ oci_base }}/volumes/config.toml:/config.toml
      - {{ oci_base }}/volumes/images:/images
    environment:
      - TZ={{ timezone }}
      - DEPLOYMENT_TIME={{ deployment_time }}
      - RUST_LOG=info
    networks:
      - proxy
      - oci
    healthcheck:
      test: ["CMD", "/simple-registry", "scrub"]
      timeout: 10s
      interval: 30s
      retries: 2
      start_period: 5s
    deploy:
      mode: replicated
      update_config:
        parallelism: 1
        failure_action: rollback
        order: start-first
        monitor: 5s
      replicas: 1
      labels:
        - traefik.enable=true
        - traefik.swarm.network=proxy
        - traefik.http.routers.oci.tls=true
        - traefik.http.routers.oci.tls.certResolver=letsencrypt
        - traefik.http.routers.oci.rule=Host(`{{ oci_domain }}`)
        - traefik.http.routers.oci.entrypoints=websecure
        - traefik.http.services.oci.loadbalancer.server.port=8000

networks:
  oci:
    attachable: true
    driver: overlay
  proxy:
    external: true