forked from leg100/otf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (76 loc) · 2.35 KB
/
docker-compose.yml
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
services:
postgres:
image: postgres:14-alpine
ports:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 3
# * setting high max_connections number avoids the error when running large number of
# integration tests in parallel:
#
# FATAL: sorry, too many clients already
#
# * disabling fsync dramatically improves integration test speed
#
# NOTE: neither setting is appropriate for a production deployment
command: -c fsync=off -c max_connections=999
environment:
- POSTGRES_PASSWORD=postgres
# Terraform-based tests spawn `terraform`. These tests retrieve providers from
# the internet which can consume quite a lot of bandwidth and slow down the tests
# significantly. To cache these providers we use the squid caching
# proxy (http://www.squid-cache.org/).
#
# It is configured to use
# [SSL-bumping](https://wiki.squid-cache.org/Features/SslBump), which permits
# caching content transported via SSL (`terraform` retrieves providers only via
# SSL).
squid:
image: leg100/squid:0.2.2
ports:
- 3128
healthcheck:
test: ["CMD-SHELL", "nc -zw1 localhost 3128"]
interval: 5s
timeout: 5s
retries: 3
stop_signal: SIGINT
tty: true
volumes:
- ./internal/integration/fixtures:/etc/squid/certs
pubsub:
image: google/cloud-sdk:emulators
ports:
- 8085
stop_signal: SIGINT
command: gcloud beta emulators pubsub start --project=abc123 --host-port=0.0.0.0:8085
otfd:
image: leg100/otfd:latest
depends_on:
postgres:
condition: service_healthy
squid:
condition: service_healthy
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "sh", "-c", "echo check | nc localhost 8080"]
interval: 5s
timeout: 5s
retries: 3
environment:
- OTF_DATABASE=postgres://postgres:postgres@postgres/postgres?sslmode=disable
- OTF_SECRET=6b07b57377755b07cf61709780ee7484
- OTF_SITE_TOKEN=site-token
- OTF_SSL=true
- OTF_CERT_FILE=/fixtures/cert.pem
- OTF_KEY_FILE=/fixtures/key.pem
- OTF_LOG_HTTP_REQUESTS=true
- HTTPS_PROXY=squid:3128
- SSL_CERT_FILE=/fixtures/cert.pem
- OTF_HOSTNAME=otf.local
volumes:
- ./internal/integration/fixtures:/fixtures