Skip to content

Commit 49890c9

Browse files
feat: otp
1 parent a2497f3 commit 49890c9

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

otp/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.directory
2+
graphs/default/*.osm.pbf
3+
graphs/default/*gtfs.zip
4+
graphs/default/Graph.obj
5+
otp-*.jar

otp/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:10-stretch-slim
2+
3+
RUN mkdir -p /usr/share/man/man1 && apt-get update && \
4+
apt-get install -y default-jdk wget && \
5+
apt-get clean && rm -rf /var/lib/apt/lists/*
6+
7+
WORKDIR /app
8+
RUN wget https://repo1.maven.org/maven2/org/opentripplanner/otp/1.3.0/otp-1.3.0-shaded.jar
9+
10+
COPY ./ /app
11+
12+
13+
VOLUME /data
14+
EXPOSE 8080
15+
16+
WORKDIR /app
17+
CMD [ "./start" ]

otp/graphs/default/.gitkeep

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

otp/router-config.json.example

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"updaters": [
3+
{
4+
"type": "stop-time-updater",
5+
"frequencySec": 30,
6+
"sourceType": "gtfs-http",
7+
"url": "http://gtfs-rt-server/operator",
8+
"feedId": "operator"
9+
},
10+
{
11+
"type": "bike-rental",
12+
"frequencySec": 120,
13+
"sourceType": "jcdecaux",
14+
"url": "https://api.jcdecaux.com/vls/v1/stations?apiKey=~~MYKEY~~&contract=Bruxelles-Capitale"
15+
},
16+
{
17+
"type": "bike-rental",
18+
"frequencySec": 120,
19+
"sourceType": "jcdecaux",
20+
"url": "https://api.jcdecaux.com/vls/v1/stations?apiKey=~~MYKEY~~&contract=Namur"
21+
}
22+
]
23+
}

otp/start

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
cp -a /data/Graph.obj graphs/default
4+
java -Xmx8G -jar otp-1.3.0-shaded.jar --basePath $PWD --autoScan --server --autoReload

0 commit comments

Comments
 (0)