Work with a MDS provider
Postgres database.
This container uses the following environment variables to connect to the MDS database:
POSTGRES_HOSTNAME=server
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres_password
MDS_DB=mds_provider
MDS_USER=mds_provider
MDS_PASSWORD=mds_provider_password
Run the setup scripts from within the running container directly, or by using the container in executable form with Compose.
docker-compose run db reset
docker-compose run db init
Run a migration script with the given version number
docker-compose run db migrate VERSION
Where VERSION
is a version number like x.y.z
.
Create the availability
view and associated infrastructure.
docker-compose run db availability
From the current contents of the status_changes
table.
docker-compose run db availability refresh
Create the deployments
views.
docker-compose run db deployments
From the current contents of the status_changes
table.
docker-compose run db deployments refresh
Create additional trips
and routes views.
docker-compose run db trips
From the current contents of the trips
table.
First refreshes route_points
, and then csm_routes
:
docker-compose run db trips refresh