forked from stackql/stackql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
153 lines (152 loc) · 6.54 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
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
version: "3.9"
services:
stackqlsrv:
image: stackql/stackql
build:
context: .
cache_from:
- stackql/stackql
- stackql/integration
- stackql/stackqlsrvcertificates
args:
- BUILDMAJORVERSION=${BUILDMAJORVERSION:-1}
- BUILDMINORVERSION=${BUILDMINORVERSION:-1}
- BUILDPATCHVERSION=${BUILDPATCHVERSION:-1}
command:
- bash
- -c
- 'stackql
--auth=''{
"google": { "credentialsfilepath": "/opt/stackql/credentials/dummy/google/functional-test-dummy-sa-key.json", "type": "service_account" },
"okta": { "credentialsenvvar": "OKTA_SECRET_KEY", "type": "api_key" },
"github": { "type": "basic", "credentialsenvvar": "GITHUB_CREDS" },
"aws": { "type": "aws_signing_v4", "credentialsfilepath": "/opt/stackql/credentials/dummy/aws/functional-test-dummy-aws-key.txt", "keyID": "some-key-not-a-secret" },
"k8s": { "credentialsenvvar": "K8S_TOKEN", "type": "api_key", "valuePrefix": "Bearer " }
}''
--registry=''{
"url": "https://cdn.statically.io/gh/stackql/stackql-provider-registry/dev/providers"
}''
--pgsrv.tls=''{
"keyFilePath": "/opt/stackql/srv/credentials/pg_server_key.pem",
"certFilePath": "/opt/stackql/srv/credentials/pg_server_cert.pem",
"clientCAs": [
"''$$(base64 -w 0 /opt/stackql/srv/credentials/pg_client_cert.pem)''"
]
}''
--pgsrv.address=0.0.0.0
--pgsrv.port=${PG_SRV_PORT_MTLS:-5476}
srv'
volumes:
- ./keys:/opt/stackql/keys:ro
- ./vol/srv/credentials:/opt/stackql/srv/credentials:ro
- ./test/assets/credentials/dummy:/opt/stackql/credentials/dummy:ro
- ./test/assets/input:/opt/stackql/input:ro
- ${DB_SETUP_SRC:-./test/db/sqlite}:/opt/stackql/db:ro
- ${REGISTRY_SRC:-./test/registry-mocked}:/opt/stackql/registry:ro
- ./vol/stackql/config:/opt/stackql/.stackql:rw
- ./vol/logs:/opt/stackql/logs:rw
ports:
- "${PG_SRV_PORT_DOCKER_MTLS:-5576}:${PG_SRV_PORT_MTLS:-5476}/tcp"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- OKTA_SECRET_KEY=${OKTA_SECRET_STR:-some-junk}
- GITHUB_SECRET_KEY=${GITHUB_SECRET_STR:-some-junk}
- K8S_SECRET_KEY=${K8S_SECRET_STR:-some-junk}
- AZ_ACCESS_TOKEN=${AZ_ACCESS_TOKEN:-some_junk}
- SUMO_CREDS=${SUMO_CREDS:-some_junk}
- BUILDMAJORVERSION=${BUILDMAJORVERSION:-1}
- BUILDMINORVERSION=${BUILDMINORVERSION:-1}
- BUILDPATCHVERSION=${BUILDPATCHVERSION:-1}
depends_on:
- postgres_stackql
mockserver:
image: stackql/integration
build:
context: .
cache_from:
- stackql/integration
target: integration
volumes:
- ./vol/srv/credentials:/opt/stackql/srv/credentials:rw
environment:
- MOCKSERVER_PORT_GOOGLE=${MOCKSERVER_PORT_GOOGLE:-1080}
- MOCKSERVER_PORT_OKTA=${MOCKSERVER_PORT_OKTA:-1090}
- MOCKSERVER_PORT_AWS=${MOCKSERVER_PORT_AWS:-1091}
- MOCKSERVER_PORT_K8S=${MOCKSERVER_PORT_K8S:-1092}
- MOCKSERVER_PORT_GITHUB=${MOCKSERVER_PORT_GITHUB:-1093}
- MOCKSERVER_PORT_REGISTRY=${MOCKSERVER_PORT_REGISTRY:-1094}
- MOCKSERVER_PORT_AZURE=${MOCKSERVER_PORT_AZURE:-1095}
- MOCKSERVER_PORT_SUMOLOGIC=${MOCKSERVER_PORT_SUMOLOGIC:-1096}
ports:
- "${MOCKSERVER_PORT_GOOGLE:-1080}/tcp"
- "${MOCKSERVER_PORT_OKTA:-1090}/tcp"
- "${MOCKSERVER_PORT_AWS:-1091}/tcp"
- "${MOCKSERVER_PORT_K8S:-1092}/tcp"
- "${MOCKSERVER_PORT_GITHUB:-1093}/tcp"
- "${MOCKSERVER_PORT_REGISTRY:-1094}/tcp"
- "${MOCKSERVER_PORT_AZURE:-1095}/tcp"
- "${MOCKSERVER_PORT_SUMOLOGIC:-1096}/tcp"
command:
- bash
- -c
- |
MOCKSERVER_JAR='/opt/test/stackql/test/downloads/mockserver-netty-5.12.0-shaded.jar'
JSON_INIT_FILE_DIR='/opt/test/stackql/test/mockserver/expectations'
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-gcp-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_GOOGLE}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-github-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_GITHUB}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-aws-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_AWS}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-k8s-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_K8S}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-registry-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_REGISTRY}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-okta-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_OKTA}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-sumologic-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_SUMOLOGIC}&
java -Dfile.encoding=UTF-8 \
-Dmockserver.initializationJsonPath=$${JSON_INIT_FILE_DIR}/static-azure-expectations.json \
-Dmockserver.logLevel=OFF \
-Droot.logLevel=OFF \
-jar $${MOCKSERVER_JAR} \
-serverPort $${MOCKSERVER_PORT_AZURE}
postgres_stackql:
image: postgres:14.5-bullseye
hostname: postgres_stackql
volumes:
- ./vol/postgres/setup:/docker-entrypoint-initdb.d:ro
environment:
- POSTGRES_PASSWORD=stackql
ports:
- "5432/tcp"