Code for https://bonnie.dev
GNU AFFERO GENERAL PUBLIC LICENSE
$ cp dotenv_template .env
- Fill out your environment variables
- for development, the value of
FLASK_ENV
should bedevelopment
- for development, the value of
$ cd client
$ npm install
$ npm run dev:build
$ pip install pre-commit
# if you don't have it installed globally$ cd server
- Create and activate a virtual env
$ pip install -r requirements.txt
$ pre-commit install
After changes, you can re-build the client with:
$ cd client
$ npm run build
postbuild.sh
will run automatically to move files to the correct place in app
-
$ cd server
-
$ source .env && python server.py
-
Note: You will need to re-run
npm run dev:build
upon changes to client
$ cd client
$ npm test
$ cd server
$ source .env
$ chmod +x ./run_tests.sh
(make the file executable)$ ./run_tests.sh
- Build the client
$ cd client
$ npm run build
postbuild.sh
will run automatically to move files to the correct place in app
- Upload the build
$ bash server/scripts/upload_build.sh
- log on to aws lightsail and run post-upload script
- locally:
bdd-ssh
- on lightsail:
~/bonniedotdev/server/scripts/bdd-postupload.sh
- log on to lightsail
- locally:
bdd-ssh
- Pull from GitHub
- on lightsail:
git pull origin main
- Update db if applicable
- on lightsail:
~/bonniedotdev/server/scripts/update_db.sh
- Restart server
- on lightsail:
~/bonniedotdev/server/scripts/restart_server.sh