Skip to content

Commit

Permalink
Merge pull request #111 from OneBusAway/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
aaronbrethorst authored Jan 1, 2025
2 parents 1c77db6 + 3b77403 commit 4809c6f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
22 changes: 19 additions & 3 deletions docker-compose.standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,30 @@ services:
target: /var/lib/mysql
restart: always

oba_database_pg:
image: postgres:16
container_name: oba_database_pg
environment:
POSTGRES_USER: oba_user
POSTGRES_PASSWORD: oba_password
POSTGRES_DB: oba_database
ports:
- "5432:5432"
volumes:
- type: volume
source: pg-data
target: /var/lib/postgresql/data
restart: always

oba_app:
container_name: oba_app
depends_on:
- oba_database
- oba_database_pg
build:
context: ./oba
environment:
- JDBC_URL=jdbc:mysql://oba_database:3306/oba_database
- JDBC_DRIVER=com.mysql.cj.jdbc.Driver
- JDBC_URL=jdbc:postgresql://oba_database_pg:5432/oba_database
- JDBC_DRIVER=org.postgresql.Driver
- JDBC_USER=oba_user
- JDBC_PASSWORD=oba_password
- TEST_API_KEY=test # For test only, remove in production
Expand All @@ -38,3 +53,4 @@ services:

volumes:
mysql-data:
pg-data:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
restart: always

oba_database_pg:
image: postgres:15
image: postgres:16
container_name: oba_database_pg
environment:
POSTGRES_USER: oba_user
Expand Down
15 changes: 0 additions & 15 deletions oba/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ COPY ./config/onebusaway-transit-data-federation-webapp-data-sources.xml.hbs .

WORKDIR $CATALINA_HOME/webapps

# COPY --from=builder \
# --chown=oba_user:oba_group \
# /oba/libs/postgresql.jar \
# $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/

# COPY ./config/onebusaway-enterprise-acta-webapp-data-sources.xml.hbs \
# $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/data-sources.xml.hbs


##########
# Configure onebusaway-api-webapp
##########
Expand All @@ -132,9 +123,6 @@ COPY --from=builder \
/oba/libs/postgresql.jar \
$CATALINA_HOME/webapps/ROOT/WEB-INF/lib/

COPY ./config/onebusaway-api-webapp-data-sources.xml.hbs \
$CATALINA_HOME/webapps/onebusaway-api-webapp/WEB-INF/classes/data-sources.xml.hbs

RUN mkdir -p /opt/oba/logs
RUN chown -R oba_user:oba_group /opt/oba/logs
RUN chmod 755 /opt/oba/logs
Expand Down Expand Up @@ -162,9 +150,6 @@ COPY --from=builder \
/oba/libs/postgresql.jar \
onebusaway-transit-data-federation-webapp/WEB-INF/lib/

COPY ./config/onebusaway-transit-data-federation-webapp-data-sources.xml.hbs \
$CATALINA_HOME/webapps/onebusaway-transit-data-federation-webapp/WEB-INF/classes/data-sources.xml.hbs

##########
# Clean up
##########
Expand Down
2 changes: 1 addition & 1 deletion oba/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ -n "$GTFS_URL" ]; then
mkdir -p /bundle
wget -O /bundle/gtfs.zip "$GTFS_URL"
cd /bundle \
&& java -Xss4m -Xmx3g \
&& java -Xss4m -Xmx2g \
-jar /oba/libs/onebusaway-transit-data-federation-builder-withAllDependencies.jar \
./gtfs.zip \
.
Expand Down

0 comments on commit 4809c6f

Please sign in to comment.