File size: 4,962 Bytes
539f1db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
  main:
    depends_on:
      reference:
        condition: service_healthy
      browser:
        condition: service_healthy
      mailbox:
        condition: service_healthy
    environment:
      WEBSITEBENCH_REFERENCE_URL: https://reference:8080
      WEBSITEBENCH_CANDIDATE_URL: http://127.0.0.1:3000
      PORT: '3000'
      DATA_DIR: /tmp/websitebench-data
      WEBSITEBENCH_AGENT_EMAIL: agent@airtable.websitebench.test
      WEBSITEBENCH_MAILBOX_INBOX_URL: http://mailbox:8026
    network_mode: service:harbor-docker-egress-control-sidecar
    volumes:
    - websitebench-browser-share:/browser-share
  reference:
    build:
      context: ./reference
    environment:
      PORT: '8080'
      WEBSITEBENCH_SMTP_HOST: mailbox-internal
      WEBSITEBENCH_SMTP_PORT: '1025'
      WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL: http://mailbox-internal:8025/internal/bootstrap
      WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN: a4ee5d79f19037362abc90cccacaf27cb7acff58dfa8c83e56f11811f8a7820d
      WEBSITEBENCH_MAIL_API_URL: http://mailbox-internal:8025/emails
      WEBSITEBENCH_MAIL_API_TOKEN: a4ee5d79f19037362abc90cccacaf27cb7acff58dfa8c83e56f11811f8a7820d
      WEBSITEBENCH_MAIL_FROM: no-reply@airtable.websitebench.local
    networks:
    - websitebench-reference
    - websitebench-mail
    depends_on:
      mailbox:
        condition: service_healthy
  harbor-docker-egress-control-sidecar:
    image: alpine:3.23.4@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
    entrypoint:
    - /bin/sh
    - -c
    - while true; do sleep 3600; done
    networks:
      websitebench-agent-egress: {}
      websitebench-browser-control:
        aliases:
        - candidate
  browser:
    build:
      context: .
    command:
    - python
    - /opt/websitebench/agent-browser/gateway.py
    environment:
      WEBSITEBENCH_BROWSER_REFERENCE_URL: https://reference:8080
      WEBSITEBENCH_BROWSER_CANDIDATE_URL: http://candidate:3000
      WEBSITEBENCH_BROWSER_MAILBOX_URL: http://mailbox:8026
      WEBSITEBENCH_BROWSER_GATEWAY_BIND: 0.0.0.0
    healthcheck:
      test:
      - CMD
      - python
      - -c
      - import urllib.request as r;r.urlopen('http://127.0.0.1:9224/healthz',timeout=1)
      interval: 2s
      timeout: 2s
      retries: 30
    networks:
    - websitebench-browser-control
    - websitebench-reference
    volumes:
    - websitebench-browser-share:/browser-share
  mailbox:
    build:
      context: ./mailbox
    depends_on:
      mailpit:
        condition: service_healthy
    environment:
      PYTHONDONTWRITEBYTECODE: '1'
      WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN: a4ee5d79f19037362abc90cccacaf27cb7acff58dfa8c83e56f11811f8a7820d
      WEBSITEBENCH_MAIL_API_URL: http://mailbox-internal:8025/emails
      WEBSITEBENCH_MAIL_API_TOKEN: a4ee5d79f19037362abc90cccacaf27cb7acff58dfa8c83e56f11811f8a7820d
      WEBSITEBENCH_MAIL_FROM: no-reply@airtable.websitebench.local
      WEBSITEBENCH_MAILPIT_HTTP_SOCKET: /run/websitebench-mailpit/http.sock
      WEBSITEBENCH_MAILBOX_SMTP_ADVERTISE_HOST: mailbox-internal
      WEBSITEBENCH_MAILBOX_INBOX_BIND: 10.103.128.90
      WEBSITEBENCH_MAILBOX_API_BIND: 10.103.128.122
    networks:
      websitebench-browser-control:
        ipv4_address: 10.103.128.90
        aliases:
        - mailbox
      websitebench-mail:
        ipv4_address: 10.103.128.122
        aliases:
        - mailbox-internal
    volumes:
    - websitebench-mailpit-runtime:/run/websitebench-mailpit
  mailpit:
    image: ghcr.io/axllent/mailpit:v1.30.6@sha256:7f33095f80e901f6ad08028f06ca284aa58fe84942be5496008d041d3b9f4d4d
    network_mode: none
    environment:
      MP_UI_BIND_ADDR: unix:/run/websitebench-mailpit/http.sock:660
      MP_SMTP_BIND_ADDR: unix:/run/websitebench-mailpit/smtp.sock:660
      MP_DATABASE: /tmp/mailpit.db
      MP_MAX_MESSAGES: '512'
      MP_MAX_MESSAGE_SIZE: '1'
      MP_SMTP_MAX_RECIPIENTS: '16'
      MP_DISABLE_VERSION_CHECK: 'true'
      MP_ALLOW_INTERNAL_HTTP_REQUESTS: 'false'
      MP_BLOCK_REMOTE_CSS_AND_FONTS: 'true'
      MP_POP3_BIND_ADDR: ''
      MP_SMTP_RELAY_ALL: 'false'
      MP_ENABLE_CHAOS: 'false'
      MP_ENABLE_PROMETHEUS: 'false'
    healthcheck:
      test:
      - CMD
      - /bin/sh
      - -ec
      - test -S /run/websitebench-mailpit/http.sock; test -S /run/websitebench-mailpit/smtp.sock
      interval: 2s
      timeout: 2s
      retries: 30
    tmpfs:
    - /tmp
    volumes:
    - websitebench-mailpit-runtime:/run/websitebench-mailpit
networks:
  websitebench-agent-egress:
    ipam:
      config:
      - subnet: 10.103.128.64/28
  websitebench-browser-control:
    internal: true
    ipam:
      config:
      - subnet: 10.103.128.80/28
  websitebench-reference:
    internal: true
    ipam:
      config:
      - subnet: 10.103.128.96/28
  websitebench-mail:
    internal: true
    ipam:
      config:
      - subnet: 10.103.128.112/28
volumes:
  websitebench-browser-share: {}
  websitebench-mailpit-runtime: {}