Skip to content

Commit

Permalink
Merge pull request #82 from OneBusAway/timezone
Browse files Browse the repository at this point in the history
Allow configuration of the oba_app timezone
  • Loading branch information
aaronbrethorst committed May 5, 2024
2 parents c3f46a7 + 2bb7946 commit 396280f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ services:
- JDBC_USER=oba_user
- JDBC_PASSWORD=oba_password
- TEST_API_KEY=test # For test only, remove in production
- TZ=America/New_York

volumes:
# Share the host's `bundle` directory
# with the filesystem of the OBA service.
Expand Down
5 changes: 5 additions & 0 deletions oba/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM tomcat:8.5.98-jdk11-temurin

ENV CATALINA_HOME /usr/local/tomcat
ENV TZ=America/New_York
ARG OBA_VERSION=2.4.18-cs
ENV OBA_VERSION=$OBA_VERSION

Expand All @@ -13,11 +14,15 @@ RUN apt-get update && apt-get install -y \
jq \
magic-wormhole \
supervisor \
tzdata \
unzip \
xmlstarlet \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Set the configured time zone
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && dpkg-reconfigure -f noninteractive tzdata

RUN groupadd -g $GID $GROUP && \
useradd -d /home/$USER -u $UID -m -s /bin/bash -g $GROUP $USER && \
chown -R $USER:$GROUP $CATALINA_HOME && \
Expand Down
2 changes: 2 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
healthCheckPath: /onebusaway-api-webapp/api/where/current-time.json?key=org.onebusaway.iphone
autoDeploy: false
envVars:
- key: TZ
sync: false
- key: GTFS_URL
sync: false
- key: VEHICLE_POSITIONS_URL
Expand Down

0 comments on commit 396280f

Please sign in to comment.