services: oba_bundler: build: context: ./bundler volumes: - ./bundle:/bundle environment: - GTFS_URL=${GTFS_URL:-https://unitrans.ucdavis.edu/media/gtfs/Unitrans_GTFS.zip} oba_database: image: mysql:8.4 container_name: oba_database environment: MYSQL_ROOT_PASSWORD: Ins3cure! MYSQL_DATABASE: oba_database MYSQL_USER: oba_user MYSQL_PASSWORD: oba_password # Published on loopback only: these are well-known development credentials. ports: - "127.0.0.1:3306:3306" volumes: - type: volume source: mysql-data 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 # Published on loopback only: these are well-known development credentials. ports: - "127.0.0.1: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 - TZ=America/Los_Angeles - GTFS_URL=${GTFS_URL:-https://unitrans.ucdavis.edu/media/gtfs/Unitrans_GTFS.zip} volumes: # Share the host's `bundle` directory # with the filesystem of the OBA service. - ./bundle:/bundle ports: # Access the webapp on your host machine at a path like # http://localhost:8080/onebusaway-api-webapp/api/where/agency/${YOUR_AGENCY}.json?key=TEST - "8080:8080" - "127.0.0.1:1234:1234" # JMX exporter port (unauthenticated; keep off public interfaces) # networks: # - monitoring # - default # restart: always # Uncomment the following section to test with prometheus and the JMX exporter in localhost # networks: # monitoring: # external: true volumes: mysql-data: pg-data: