Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
# Build with: | ||
# docker build . --build-arg r5version=$(gradle -q printVersion | head -n1) | ||
# or | ||
# docker build . --build-arg r5version=$(cat build/version.txt) | ||
# We could instead run the Gradle build and/or fetch version information | ||
# using run actions within the Dockerfile | ||
FROM openjdk:11 | ||
ARG r5version | ||
ENV R5_VERSION=$r5version | ||
ENV JVM_HEAP_GB=2 | ||
WORKDIR /r5 | ||
COPY build/libs/r5-${R5_VERSION}-all.jar . | ||
COPY analysis.properties.template analysis.properties | ||
# Use a configuration that connects to the database on another host (container) | ||
COPY analysis.properties.docker analysis.properties | ||
EXPOSE 7070 | ||
CMD java -Xmx${JVM_HEAP_GB}g -cp r5-${R5_VERSION}-all.jar com.conveyal.analysis.BackendMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# When running in docker, we reference services running on other containers | ||
# The database is given the hostname mongo by the docker-compose links section | ||
database-uri=mongodb://mongo:27017 | ||
database-name=analysis | ||
frontend-url=https://ui:3000 | ||
bundle-bucket=analysis-local-bundles | ||
grid-bucket=analysis-local-grids | ||
results-bucket=analysis-local-results | ||
resources-bucket=analysis-local-resources | ||
seamless-census-bucket=lodes-data-2014 | ||
seamless-census-region=us-east-1 | ||
offline=true | ||
server-port=7070 | ||
local-cache=cache | ||
light-threads=3 | ||
heavy-threads=3 | ||
max-workers=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Usage: | ||
# docker-compose build --build-arg r5version=$(cat build/version.txt) | ||
# docker-compose up | ||
version: '3' | ||
services: | ||
r5: | ||
container_name: r5 | ||
build: . | ||
# image: ghcr.io/conveyal/r5:latest | ||
depends_on: | ||
- mongo | ||
links: | ||
- mongo | ||
ports: | ||
- "7070:7070" | ||
# TODO volumes for backend cache directory | ||
ui: | ||
container_name: ui | ||
depends_on: | ||
- mongo | ||
# build: ../analysis-ui | ||
# image: ghcr.io/conveyal/analysis-ui:latest | ||
image: 037a38bb2cdf | ||
ports: | ||
- "3000:3000" | ||
links: | ||
- r5 | ||
- mongo | ||
# Map in a config file with mapbox keys, telling the UI to contact host (container) r5 | ||
volumes: | ||
- ./ui-env:/ui/.env.local:ro | ||
mongo: | ||
container_name: mongo | ||
image: mongo | ||
restart: always | ||
volumes: | ||
- mongo-volume:/data/db:rw | ||
ports: | ||
- "27017:27017" | ||
|
||
volumes: | ||
mongo-volume: |