summaryrefslogtreecommitdiff
path: root/playbooks/roles/ci/templates/stacks/docker-compose.yml
blob: 3aee1da8347c7c4d55c7c7ada164ffe8e3516a5f (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---

services:
  worker:
    image: oci.liz.coffee/@emprespresso/ci-worker:release
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - {{ ci_base }}/volumes/laminar:/var/lib/laminar/
      - /var/lib/laminar/cfg # don't overwrite cfg jobs & scripts
    environment:
      - TZ={{ timezone }}
      - DEPLOYMENT_TIME={{ deployment_time }}
      - BW_SERVER=https://{{ passwd_domain }}
      - BW_CLIENTID={{ passwd_client_id }}
      - BW_CLIENTSECRET={{ passwd_client_secret }}
      - BW_PASSWORD={{ passwd_master_password }}
      - LAMINAR_BIND_RPC=*:9997
    networks:
      - ci
      - proxy
    deploy:
      mode: replicated
      update_config:
        parallelism: 1
        failure_action: rollback
        order: start-first
        delay: 5s
        monitor: 20s
      replicas: 1
      labels:
        - traefik.enable=true
        - traefik.swarm.network=proxy
        - traefik.http.routers.ci.tls=true
        - traefik.http.routers.ci.tls.certResolver=letsencrypt
        - traefik.http.routers.ci.rule=Host(`{{ ci_domain }}`)
        - traefik.http.routers.ci.entrypoints=websecure
        - traefik.http.services.ci.loadbalancer.server.port=8080

  cihooks:
    image: oci.liz.coffee/@emprespresso/ci-hooks:release
    environment:
      - LAMINAR_HOST=worker:9997
      - LAMINAR_URL=worker:9997
      - TZ={{ timezone }}
      - DEPLOYMENT_TIME={{ deployment_time }}
    networks:
      - ci
    deploy:
      mode: replicated
      update_config:
        parallelism: 1
        failure_action: rollback
        order: start-first
        delay: 5s
        monitor: 10s

networks:
  ci:
    driver: overlay
    attachable: true
    name: ci
  proxy:
    external: true