@@ -46,6 +46,19 @@ config :transport,
4646 dynamic_irve_tick_interval: :timer . seconds ( if ( config_env ( ) == :dev , do: 10 , else: 30 ) ) ,
4747 dynamic_irve_initial_sync: config_env ( ) != :test
4848
49+ config :transport ,
50+ # This endpoint is not really public but we can use it for now
51+ # See https://github.com/MobilityData/gbfs-validator/issues/53#issuecomment-957917240
52+ gbfs_validator_url:
53+ System . get_env ( "GBFS_VALIDATOR_URL" , "https://gbfs-validator.netlify.app/.netlify/functions/validator" ) ,
54+ gbfs_validator_website: System . get_env ( "GBFS_VALIDATOR_WEBSITE" , "https://gbfs-validator.netlify.app" )
55+
56+ # In :test, gtfs_validator_url is set in test.exs.
57+ if config_env ( ) != :test do
58+ config :transport ,
59+ gtfs_validator_url: System . get_env ( "GTFS_VALIDATOR_URL" , "https://validation.transport.data.gouv.fr" )
60+ end
61+
4962# Inside IEx, we do not want jobs to start processing, nor plugins working.
5063# The jobs can be heavy and for instance in production, one person could
5164# unknowningly create duplicate RAM heavy jobs. With this trick, we can still
@@ -236,6 +249,12 @@ if config_env() == :dev do
236249 watchers: if ( webserver , do: [ npm: [ "run" , "--prefix" , "apps/transport/client" , "watch" ] ] , else: [ ] )
237250end
238251
252+ if config_env ( ) == :dev do
253+ config :transport , DB.Repo ,
254+ url: System . get_env ( "PG_URL" ) || "ecto://postgres:postgres@localhost/transport_repo" ,
255+ pool_size: ( System . get_env ( "PG_POOL_SIZE" ) || "10" ) |> String . to_integer ( )
256+ end
257+
239258if config_env ( ) == :prod do
240259 pool_size =
241260 case app_env do
@@ -262,8 +281,10 @@ if config_env() == :prod do
262281 ] ,
263282 socket_options: [ keepalive: true ] ,
264283 # See https://hexdocs.pm/db_connection/DBConnection.html#start_link/2-queue-config
265- # [Ecto.Repo] :pool_timeout is no longer supported in favor of a new queue system described in DBConnection.start_link/2
266- # under "Queue config". For most users, configuring :timeout is enough, as it now includes both queue and query time
284+ # [Ecto.Repo] :pool_timeout is no longer supported in favor of a new queue system
285+ # described in DBConnection.start_link/2
286+ # under "Queue config". For most users, configuring :timeout is enough,
287+ # as it now includes both queue and query time
267288 timeout: 15_000
268289
269290 config :transport , TransportWeb.Endpoint ,
0 commit comments