This repository has been archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
docker-compose.yml
68 lines (61 loc) · 2.36 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
### Port conventions (though there are many, many exceptions)
# 82xx - TBD
# 83xx - grapl plugin services, like grapl-aws-plugins
# 84xx - debugger ports (see vsc_debugger.py)
version: "3.8"
services:
pulumi:
image: local-pulumi:${IMAGE_TAG}
entrypoint: ["/bin/bash", "-o", "errexit", "-o", "nounset", "-c"]
command:
- |
pulumi login --local
TRACING_BACKEND_URL="http://host.docker.internal:9411/api/v1/spans"
if [[ "${WITH_PULUMI_TRACING}" -eq 1 ]]; then
TRACING_ARGS="--tracing $$TRACING_BACKEND_URL";
else
TRACING_ARGS="";
fi
(
cd grapl
pulumi stack init local-grapl --non-interactive
pulumi up --yes --stack=local-grapl $$TRACING_ARGS
)
# Theoretically, we could skip uploading these job definitions for
# every local `up`; but it's a 2s Pulumi operation and they
# don't auto-execute since they're Parameterized Batch Jobs.
# Basically: It's mostly harmless.
(
cd python_integration_tests
# Ideally this stack name would be scoped by organization, but
# login --local doesn't support organizations
pulumi stack init local-grapl-python-integration-tests --non-interactive
pulumi up --yes --stack=local-grapl-python-integration-tests $$TRACING_ARGS
)
(
cd rust_integration_tests
# Ideally this stack name would be scoped by organization, but
# login --local doesn't support organizations
pulumi stack init local-grapl-rust-integration-tests --non-interactive
pulumi up --yes --stack=local-grapl-rust-integration-tests $$TRACING_ARGS
)
volumes:
- type: bind
source: ./dist
target: /home/grapl/dist
read_only: true
build:
args:
PYTHON_VERSION: "${PYTHON_VERSION}"
environment:
IMAGE_TAG:
PULUMI_CONFIG_PASSPHRASE: local-grapl-passphrase
DOCKER_USER: "${UID}:${GID}"
GRAPL_ROOT: "${GRAPL_ROOT}"
WITH_PULUMI_TRACING: "${WITH_PULUMI_TRACING}"
# Other environment variables like MG_ALPHAS are passed in via
# Pulumi.local-grapl.yaml
extra_hosts:
# Expose the host Linux machine, despite being on the Grapl network.
# This lets Pulumi talk to the host's Nomad
- "host.docker.internal:host-gateway"