Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract LAMASSU_BASE_URL as env variable #13

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ LAMASSU_IMAGE=mfdz/lamassu:latest
LAMASSU_PORT=8500
LAMASSU_ADMIN_PORT=9002
LAMASSU_ADMIN_PASSWORD=secret
# NOTE: LAMASSU_BASE_URL should be the host machine's DNS namme / IP address.
# i.e. it must be accessible from inside docker containers, i.e. dagster-pipeline.
# Define this variable e.g. in .env.local with http://my-machines-ip:8500
LAMASSU_BASE_URL=http://lamassu:8080
the-infinity marked this conversation as resolved.
Show resolved Hide resolved

# postgis variables
IPL_POSTGIS_IMAGE=postgis/postgis:15-3.3-alpine
Expand All @@ -29,5 +33,3 @@ DAGSTER_POSTGRES_USER=postgres_user
DAGSTER_POSTGRES_PASSWORD=postgres_password
DAGSTER_POSTGRES_DB=postgres_db

# Pipeline variables
IPL_LAMASSU_BASE_URL=http://lamassu:8080
1 change: 1 addition & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LAMASSU_ADMIN_PASSWORD=
LAMASSU_BASE_URL=http://10.70.172.11:8500
IPL_POSTGRES_PASSWORD=
DEER_USER=
DEER_PASSWORD=
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
- ${LAMASSU_ADMIN_PORT}:9001
environment:
# depending on base image, JAVA_TOOL_OPTIONS must be used
LAMASSU_BASE_URL: ${LAMASSU_BASE_URL}
JDK_JAVA_OPTIONS:
-Dspring.config.location=/etc/application-config/application.properties
-Dspring.profiles.active=leader
Expand Down Expand Up @@ -99,7 +100,7 @@ services:
- DAGSTER_POSTGRES_USER
- DAGSTER_POSTGRES_PASSWORD
- DAGSTER_POSTGRES_DB
- IPL_LAMASSU_BASE_URL
- IPL_LAMASSU_BASE_URL=${LAMASSU_BASE_URL}
- IPL_POSTGRES_HOST=ipl-db
- IPL_POSTGRES_PORT
- IPL_POSTGRES_DB
Expand Down
2 changes: 1 addition & 1 deletion etc/lamassu/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ org.entur.lamassu.feedproviders=file:/etc/application-config/feedproviders.yml
org.entur.lamassu.targetGbfsVersion=2.3

## Base URL for API (needed for URL transformations)
org.entur.lamassu.baseUrl=http://10.70.172.11:8500
org.entur.lamassu.baseUrl=${LAMASSU_BASE_URL}

## Host / IP of internal load balancer for internal endpoints (Entur)
org.entur.lamassu.internalLoadBalancer=http://localhost:8080
Expand Down