hackoregon / transportation-system-backend

2018 repo for the transportation api backend
MIT License
8 stars 2 forks source link

docker container setup #2

Closed kiniadit closed 6 years ago

kiniadit commented 6 years ago

Issues so far -

bhgrant8 commented 6 years ago

In regards to: django not recognizing docker local ports.

this may be a question of your host postgres not allowing outside connections. it is possible to change your config to open up, not sure if this is the most secure option but possible. General Guide:

http://winstonkotzan.com/blog/2017/06/01/connecting-to-external-postgres-database-with-docker.html

Alternate is maybe setting up the volume in the docker-compose. that way the persistent storage is in the hd but connection is isolated through container.

adding something along the line of the following to the db section of the compose file:

volumes:
  - /path/to/your/host/directory:/var/lib/postgresql/data
kiniadit commented 6 years ago

docker container setup complete. I can work on documenting this once I discuss this next week.