pg_featureserv use custom config file from docker run

Published

Im trying to spin up a docker image of pg_featureserv and use a local config file but I am having no luck with it. following this guide for it https://access.crunchydata.com/documentation/pg_featureserv/1.2.0/installation/installing/

My command

sudo docker run -e DATABASE_URL=myconnection -e config=/home/name/Documents/freelance_map/map/pg_featureserv.toml -p 9000:9000 pramsey/pg_featureserv

it starts up but it reads from the default config

time="2022-01-15T04:02:19Z" level=info msg="----  pg_featureserv - Version 1.1 ----------n"
time="2022-01-15T04:02:19Z" level=info msg="Using config file: DEFAULT"
time="2022-01-15T04:02:19Z" level=info msg="Using database connection info from environment variable DATABASE_URL"
time="2022-01-15T04:02:19Z" level=info msg="pg-featureservn"
time="2022-01-15T04:02:19Z" level=info msg="Connected as postgres to freelance @ myip"
time="2022-01-15T04:02:19Z" level=info msg="Serving at 0.0.0.0:9000n"
time="2022-01-15T04:02:19Z" level=info msg="CORS Allowed Origins: *n"

I also cannot run it from the pure install like this

export DATABASE_URL=postgresql://username:[email protected]/dbname
./pg_featureserv

gives me a different error which I am not asking the question on

Source: Docker Questions

Published
Categorised as docker, postgis Tagged ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq