-
Notifications
You must be signed in to change notification settings - Fork 29
/
docker-compose.test-custom.yml
165 lines (164 loc) · 7.37 KB
/
docker-compose.test-custom.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
154
155
156
157
158
159
160
161
162
163
164
165
version: "2.4"
services:
db:
image: balena/open-balena-db:v5.2.2
ports:
- "5432"
- "5431:5432"
networks:
- local-test
redis:
image: valkey/valkey:8-alpine
ports:
- "6378:6379"
networks:
- local-test
loki:
image: grafana/loki:3.3.2
ports:
- "9095:9095"
- "3100:3100"
networks:
- local-test
minio-server:
image: minio/minio:RELEASE.2024-09-22T00-33-43Z
environment:
MINIO_ROOT_USER: USERNAME
MINIO_ROOT_PASSWORD: PASSWORD
command: server /data --console-address ":9001"
ports:
- "43680:9000"
- "43697:9001"
networks:
- local-test
minio-client:
image: minio/mc:RELEASE.2024-07-22T20-02-49Z
depends_on:
- minio-server
entrypoint: >
/bin/sh -c "
set -e;
/usr/bin/mc config host add minio-server http://minio-server:9000 USERNAME PASSWORD;
/usr/bin/mc mb --ignore-existing minio-server/balena-pine-web-resources;
sleep infinity;
"
networks:
- local-test
sut:
build:
context: ./
target: test
command: npx mocha
depends_on:
- "db"
- "redis"
- "loki"
- "minio-client"
ports:
- "9228:9229"
networks:
- local-test
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup
- ./automation/check-model-types-generated.sh:/usr/src/app/automation/check-model-types-generated.sh
privileged: true
environment: &env
API_HOST: 127.0.0.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ST: files_host.com
GENERATE_CONFIG: ${GENERATE_CONFIG:-}
HIDE_UNVERSIONED_ENDPOINT: false
IMAGE_STORAGE_BUCKET: balena-dev-img
IMAGE_STORAGE_ENDPOINT: s3.balenadev.io
IMAGE_STORAGE_PREFIX: images
IMAGE_STORAGE_ACCESS_KEY: ACCESS_KEY
IMAGE_STORAGE_SECRET_KEY: SECRET_KEY
JSON_WEB_TOKEN_EXPIRY_MINUTES: 720
JSON_WEB_TOKEN_SECRET: purple
JSON_WEB_TOKEN_LIMIT_EXPIRY_REFRESH: true
LOGS_HOST: logs.balenadev.io
METRICS_MAX_REPORT_INTERVAL_SECONDS: 3
MIXPANEL_TOKEN: mixpanel_token
NUM_WORKERS: 1
PORT: 80
TRUST_PROXY: "true"
REDIS_IS_CLUSTER: "false"
REDIS_HOST: "redis:6379"
REDIS_LOGS_SHARDED_PUBSUB: "true"
LOKI_HOST: loki
LOKI_QUERY_HTTP_PORT: 3100
LOKI_INGESTER_GRPC_PORT: 9095
LOKI_WRITE_PCT: 100
REGISTRY2_HOST: registry2.balenadev.io
REQUEST_MOCK_DEBUG: 0
RUN_TESTS: 1
SUPERUSER_EMAIL: [email protected]
SUPERUSER_PASSWORD: Password01
TOKEN_AUTH_BUILDER_TOKEN: token_auth_builder_token
TOKEN_AUTH_CERT_ISSUER: 'api.balenadev.io'
TOKEN_AUTH_CERT_KEY: 'LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUs0VWtLQ1RFamlJamtNVnNtaG96emhScmxrZ2REOU1RN01jdWd2MFZTbHhvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFYVZQN21pUGdTU0JTWjBLYnp4L2pvZnVlWE1KVHpITkpuYno2enlTWHBJS1I3RzFXQkROYwpRRXZpWFZqUk45MWVybHdSMDNITWpjUm81Ymt4b2gzREdnPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo='
TOKEN_AUTH_CERT_KID: 'NVJXMzpRREhTOldDUjQ6NzdLUjpVSTJZOldPS086UTUzVTpNUFVXOlFWRVA6QUZZWDpBMkMyOkRLNDcK'
TOKEN_AUTH_CERT_PUB: 'LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFYVZQN21pUGdTU0JTWjBLYnp4L2pvZnVlWE1KVAp6SE5KbmJ6Nnp5U1hwSUtSN0cxV0JETmNRRXZpWFZqUk45MWVybHdSMDNITWpjUm81Ymt4b2gzREdnPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=='
TOKEN_AUTH_JWT_ALGO: ES256
VPN_HOST: vpn.balenadev.io
VPN_POLL_INTERVAL: 5
VPN_PORT: 5433
VPN_SERVICE_API_KEY: vpn_service_api_key
VPN_SERVICE_CONNECTIONS: 5
WEBRESOURCES_S3_ACCESS_KEY: USERNAME
WEBRESOURCES_S3_SECRET_KEY: PASSWORD
WEBRESOURCES_S3_REGION: devenv
WEBRESOURCES_S3_HOST: http://minio-server:9000
WEBRESOURCES_S3_BUCKET: balena-pine-web-resources
WEBRESOURCES_S3_MAX_FILESIZE: 50000000
sut-fast:
build:
context: ./
target: test
depends_on:
- "db"
- "redis"
- "loki"
- "minio-client"
ports:
- "9228:9229"
networks:
- local-test
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup
- ./node_modules:/usr/src/app/node_modules
# Exclude syncing node_modules that have a native build step
# to avoid hostOS/container incompatibility issues.
# Search for '-gyp' in the `package.json`s in node_modules.
- /usr/src/app/node_modules/@mapbox/node-pre-gyp
- /usr/src/app/node_modules/bcrypt
- /usr/src/app/node_modules/grpc
- /usr/src/app/node_modules/nan
- /usr/src/app/node_modules/node-addon-api
- /usr/src/app/node_modules/@napi-rs
- ./package.json:/usr/src/app/package.json
- ./package-lock.json:/usr/src/app/package-lock.json
- ./config.ts:/usr/src/app/config.ts
- ./src:/usr/src/app/src
- ./test:/usr/src/app/test
- ./typings:/usr/src/app/typings
- ./bin:/usr/src/app/bin
- ./index.js:/usr/src/app/index.js
- ./init.ts:/usr/src/app/init.ts
- ./tsconfig.json:/usr/src/app/tsconfig.json
- ./tsconfig.build.json:/usr/src/app/tsconfig.build.json
- ./.materialized-config.json:/usr/src/app/.materialized-config.json
privileged: true
environment:
<<: *env
networks:
local-test: