hackforla / peopledepot

A project to setup a datastore for people and projects at HackforLA. The link below takes you to the code documentation
https://hackforla.github.io/peopledepot/
GNU General Public License v2.0
6 stars 26 forks source link

Local env #243

Closed ethanstrominger closed 5 months ago

ethanstrominger commented 8 months ago

What changes did you make?

Why did you make the changes (we will use this info to test)?

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied ![image](Paste_Your_Image_Link_Here_After_Attaching_Files)
Visuals after changes are applied ![image](Paste_Your_Image_Link_Here_After_Attaching_Files)
ethanstrominger commented 8 months ago

pre-commit.ci autofix

fyliu commented 7 months ago

So here I modified the code to satisfy the shellcheck warning.

fyliu commented 6 months ago

@ethanstrominger I've been trying to clean up the commit, but it looks like something is causing the local setup to use sqlite even though only the postgres settings are present.

Update: I tried some more and it looks like the environment variable SQL_ENGINE is not set while others are. I tried setting it in start-local.sh, but it still created an sqlite database rather than try to use postgres.

fyliu commented 6 months ago

I'm not sure if I'm missing a step. Here's what I did

peopledepot/app
❯ cp .env.local-example .env.local                                                                                                                                                     
❯ python -m venv venv
❯ source ../scripts/activate.sh
Sourced OK                                                                                                                                                                                                       
Done                                                                                                                                                                                                                                                                                                                                                                                                                              
❯ pip install -r requirements.txt
...
❯ source ../scripts/start-local.sh
SQL USER people_depot
file = SQL_ENGINE= / SQL_ENGINE= /
Loading environment variables from SQL_ENGINE=
File SQL_ENGINE= not found
If executing locally, copy .env.example.dev to SQL_ENGINE= and edit as needed
ERROR: loadenv.sh failed
fyliu commented 5 months ago

Added some change descriptions to this PR.