Skip to content

Commit

Permalink
refact work
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanocudini committed Feb 14, 2020
1 parent c082f2b commit 4315334
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ logs
graphs
elevation_cache
data

ors/openrouteservice
42 changes: 0 additions & 42 deletions Dockerfile

This file was deleted.

12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# docker-ors-vroom

* test.json example of vroom problem
* test.sh send test.json to vroom

## Setup

```bash
git clone https://github.com/GIScience/openrouteservice.git ./ors/openrouteservice
```

* vroom/test.json example of vroom problem
* vroom/test.sh send test.json to vroom

* example.ipynb python notebook to test Optimization Routing by ors python binding
Empty file added data/.gitkeep
Empty file.
28 changes: 14 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ networks:
driver: bridge
services:
ors:
container_name: ors-smartbin
container_name: smartbin-ors
#TODO build
ports: ["8080:8080"]
image: docker_ors-smartbin:latest
image: smartbin-ors:latest
build:
context: ../openrouteservice/
context: ./ors/openrouteservice/
#dockerfile: ./ors/openrouteservice/Dockerfile
args:
# APP_CONFIG: ../docker-ors-vroom/ors.config
# OSM_FILE: ../docker-ors-vroom/data/povo.osm.gz
#APP_CONFIG: ../config.json
#OSM_FILE: ../../data/povo.osm.gz
JAVA_OPTS: -Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g
CATALINA_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost
volumes:
- ./ors-config.json:/ors-core/openrouteservice/src/main/resources/app.config
- ./ors/config.json:/ors-core/openrouteservice/src/main/resources/app.config
- ./data/povo.osm.gz:/ors-core/data/osm_file.pbf
- ./graphs:/ors-core/data/graphs
- ./elevation_cache:/ors-core/data/elevation_cache
- ./graphs/:/ors-core/data/graphs
- ./elevation_cache/:/ors-core/data/elevation_cache
- ./logs/:/var/log/ors/
- ./logs/:/usr/local/tomcat/logs
vroom:
container_name: vroom-smartbin
image: vroom-ors:latest
container_name: smartbin-vroom
image: smartbin-vroom:latest
build:
context: ./

ports: ["8083:3000"]
context: ./vroom/
ports: ["3000:3000"]
volumes:
- ./vroom-config.js:/vroom-express/src/config.js
- ./vroom/config.js:/vroom-express/src/config.js

#vroom-test:
# image: nginx
Expand Down
Empty file added elevation_cache/.gitkeep
Empty file.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions vroom-start.sh

This file was deleted.

4 changes: 0 additions & 4 deletions vroom-test.sh

This file was deleted.

37 changes: 37 additions & 0 deletions vroom/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:18.04

RUN apt-get update
RUN mkdir -p /src
RUN cd /src

ENV VROOM_BRANCH master
RUN apt-get install -qq \
build-essential \
g++ \
git-core \
libboost-all-dev \
make \
pkg-config && \
git clone https://github.com/GIScience/vroom.git /src/vroom && \
mkdir -p /src/vroom/bin && \
cd /src/vroom/src && \
make && \
cp /src/vroom/bin/vroom /usr/local/bin/

RUN cd /

ENV VROOM_EXPRESS_BRANCH master
#RUN apt-get update && \
RUN apt-get install -qq \
npm \
nodejs && \
git clone https://github.com/VROOM-Project/vroom-express.git /vroom-express && \
cd /vroom-express && \
npm install

#COPY config.js /vroom-express/src/config.js

RUN apt-get clean && cd /

EXPOSE 3000
CMD ["npm", "start", "--prefix", "/vroom-express"]
4 changes: 2 additions & 2 deletions vroom-config.js → vroom/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const routingServers = {
port: '8080'
},
'car': {
host: '0.0.0.0',
port: '5000'
host: 'ors',
port: '8080'
}
};

Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions vroom/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
#

curl -d @test.json -X POST -H "Content-Type: application/json" http://localhost:3000

0 comments on commit 4315334

Please sign in to comment.