An app to track dog waste that is not picked up
docker run --rm -d --name dogwastewatcher_development -v /srv/dogwastewatcher/development/db:/var/lib/postgresql/data -e POSTGRES_DB=dogwastewatcher_development -e POSTGRES_PASSWORD=password -p 55432:5432 postgis/postgis:11-2.5
Connect to the db with PGPASSWORD=password psql -h localhost -U postgres -p 55432 -d dogwastewatcher_development
Add the following to a `nextapp/.env' file (See nextapp/env.sample):
PGUSER=postgres
PGHOST=localhost
PGPASSWORD=password
PGDATABASE=dogwastewatcher_development
PGPORT=55432
AUTH0_DOMAIN=dogwastewatcher.auth0.com
AUTH0_CLIENT_ID=<INSERT_AUTH0_CLIENT_ID>
AUTH0_CLIENT_SECRET=<INSERT_AUTH0_CLIENT_SECRET>
SESSION_COOKIE_SECRET=<INSERT_SESSION_COOKIE>
REDIRECT_URI=http://localhost:3001/api/callback
POST_LOGOUT_REDIRECT_URI=http://localhost:3001/
MAPBOX_TOKEN=<INSERT_MAPBOX_TOKEN>
The SESSION_COOKIE_SECRET can be generated by running head -c24 /dev/urandom | base64
cd nextapp
npm install
npm run dev
First setup an environment variable file with the following variables:
FLYWAY_URL=jdbc:postgresql://<host>:<port>/<database_name>
FLYWAY_USER=db_user
FLYWAY_PASSWORD=db_password
- Create new sql file under "migrations" directory
docker run --rm --env-file <env_filename> --network="host" -v ${PWD}/migrations:/flyway/sql flyway/flyway:6.2.0 migrate
docker run --rm -d --name dogwastewatcher_test -v /srv/dogwastewatcher/test/db:/var/lib/postgresql/data -e POSTGRES_DB=dogwastewatcher_test -e POSTGRES_PASSWORD=password -p 55432:5432 postgis/postgis:11-2.5
- Run migrations on test db (See above)
Add the following to a `nextapp/.env.test' file (See nextapp/env.sample):
PGUSER=postgres
PGHOST=localhost
PGPASSWORD=password
PGDATABASE=dogwastewatcher_test
PGPORT=45432
cd nextapp
npm install
npm run integration-test