datamade / bga-payroll

💰 How much do your public officials make?
4 stars 4 forks source link

Sam gets app set up for local development (but without building the database) #512

Closed fgregg closed 3 years ago

fgregg commented 3 years ago

Go through step 2 in the README: https://github.com/datamade/bga-payroll#getting-started

smcalilly commented 3 years ago

@fgregg I got through step 2. Had a couple of hiccups when trying to run docker-compose up -d --build, but I worked through them.

Extra things i had to do:

Does any of that seem wrong?

hancush commented 3 years ago

@smcalilly Pinch hitting here, since @fgregg is out for the afternoon.

Copy local-settings.example.py to local-settings.py

Reasonable!

Add POSTGRES_PASSWORD=password as a postgres environment variable in docker-compose.yml. I did this because the app wasn't detecting the password I set in the local-settings.py file.

Also reasonable, and I have no idea how I was running the Postgres container without specifying a password, as it's required by the Postgres image. 🥴

docker-compose run --rm app python manage.py migrate once the app was built

Strictly speaking, the migrations should run via the migration service when you do docker-compose up, but we've had issues with race conditions in the past, which might have been at play / necessitated a manual run here.

Could you add your additional steps to the README, and submit a PR with the updates?

smcalilly commented 3 years ago

Yep! @hancush