Commit a5a337f 1 parent d38bcd3 commit a5a337f Copy full SHA for a5a337f
File tree 1 file changed +42
-5
lines changed
1 file changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,56 @@ services:
10
10
# - type: bind
11
11
# source: ~/.aws
12
12
# target: /root/.aws
13
- otp-graph-build :
13
+ mark-status-json-as-complete :
14
+ image : alpine
15
+ command : /bin/sh -c "apk add jq && touch /etc/caddy/static/status-new.json && jq '.serverStarted = \"true\"' /etc/caddy/static/status.json > /etc/caddy/static/status-new.json && rm /etc/caddy/static/status.json && mv /etc/caddy/static/status-new.json /etc/caddy/static/status.json"
16
+ depends_on :
17
+ upload-bundle :
18
+ condition : service_healthy
19
+ volumes :
20
+ - type : bind
21
+ source : ./caddy
22
+ target : /etc/caddy/
23
+ add-status-json-nonce :
24
+ image : alpine
25
+ command : " /bin/sh -e ./add-nonce.sh"
14
26
depends_on :
15
27
download-bundle :
16
28
condition : service_completed_successfully
17
- image : alpine:latest
18
- command : /bin/sh -c "mkdir -p /var/otp/graphs/ && mkdir -p /opt/otp/ && apk add --no-cache aws-cli openjdk21 nodejs git yarn && yarn global add https://github.com/ibi-group/otp-runner.git && otp-runner /var/opentripplanner/otp-runner-graph-build-manifest.json"
29
+ volumes :
30
+ - type : bind
31
+ source : ./otp
32
+ target : /var/opentripplanner/
33
+ - type : bind
34
+ source : ./caddy
35
+ target : /etc/caddy/
36
+ - type : bind
37
+ source : ./add-nonce.sh
38
+ target : /add-nonce.sh
39
+ otp-build :
40
+ depends_on :
41
+ add-status-json-nonce :
42
+ condition : service_completed_successfully
43
+ # TO do it dynamically: https://stackoverflow.com/a/50201232
44
+ image : opentripplanner/opentripplanner:latest
45
+ ports :
46
+ - " 8080:8080"
47
+ command : " --build --save"
48
+ restart : no
19
49
volumes :
20
50
- type : bind
21
51
source : ./otp
22
52
target : /var/opentripplanner
53
+ upload-bundle :
54
+ depends_on :
55
+ otp-build :
56
+ condition : service_completed_successfully
57
+ image : amazon/aws-cli
58
+ command : " s3 cp /var/opentripplanner/graph.obj ${S3_URI}/graph.obj"
59
+ volumes :
23
60
- type : bind
24
- source : ./caddy/static
25
- target : /usr/share/nginx/client/
61
+ source : ./otp
62
+ target : /var/opentripplanner
26
63
caddy :
27
64
image : caddy:latest
28
65
restart : unless-stopped
You can’t perform that action at this time.
0 commit comments