Skip to content

Commit

Permalink
add make gtfs-db-psql & make gtfs-db-latest-import shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Sep 29, 2023
1 parent 59e4afe commit 56a8294
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,11 @@ import-new-gtfs: init
$(DOCKER_COMPOSE) stop --timeout 30 gtfs-api geoserver
$(DOCKER_COMPOSE) rm gtfs-api geoserver
$(DOCKER_COMPOSE) up -d --wait --wait-timeout 30 gtfs-api geoserver

.PHONY: gtfs-db-psql
gtfs-db-psql:
$(DOCKER_COMPOSE) --env-file .imported-gtfs-db.env exec -e PGDATABASE gtfs-db /bin/sh -c 'env PGUSER="$$POSTGRES_USER" PGPASSWORD="$$POSTGRES_PASSWORD" psql'

.PHONY: gtfs-db-latest-import
gtfs-db-latest-import:
$(DOCKER_COMPOSE) exec gtfs-db /bin/sh -c 'env PGUSER="$$POSTGRES_USER" PGPASSWORD="$$POSTGRES_PASSWORD" PGDATABASE=gtfs_importer psql -b -t --csv -c "SELECT db_name FROM latest_import"'

0 comments on commit 56a8294

Please sign in to comment.