forked from readmeio/httpsnippet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
116 lines (108 loc) · 3 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
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
version: '3'
services:
httpbin:
image: mccutchen/go-httpbin
command: ['/bin/go-httpbin', '-port', '8080']
# the job of this container is to:
# - host our fake "httpbin.org"
# - terminate SSL
# - forward both 443 and 80 to the httpbin
#
# see integrations/Caddyfile for its config
reverse_proxy:
image: caddy:2.6.4
depends_on:
- httpbin
volumes:
- ./integrations/https-cert:/https-cert:ro
- ./integrations/Caddyfile:/etc/caddy/Caddyfile
environment:
- HTTPS_CERT_FILE=/https-cert/httpbin.org.pem
- HTTPS_KEY_FILE=/https-cert/httpbin.org-key.pem
networks:
default:
# on the docker-compose network, this proxy will be aliased as
# httpbin.org. To make this work with HTTPS, each integration test
# container needs to install the root CA contained in
# ./integrations/https-cert/rootCA.pem
aliases:
- httpbin.org
integration_node:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/node.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=node
- NODE_ENV=integration
- NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
integration_php:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/php.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=php
- NODE_ENV=integration
integration_python:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/python.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=python
- NODE_ENV=integration
- REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
integration_shell:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/shell.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=shell
- NODE_ENV=integration
integration_csharp:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/csharp.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=csharp
- NODE_ENV=integration
integration_c:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/c.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=c
- NODE_ENV=integration
integration_golang:
depends_on:
- reverse_proxy
build:
context: .
dockerfile: integrations/go.Dockerfile
command: 'npx vitest run src/integration.test.ts'
environment:
- HTTPBIN=true
- INTEGRATION_CLIENT=go
- NODE_ENV=integration