Code Monkey home page Code Monkey logo

dogwastewatcher's Introduction

Dog Waste Watcher

An app to track dog waste that is not picked up

Development

Database

  1. 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

Envrionment

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

Running the app

  1. cd nextapp
  2. npm install
  3. npm run dev

Migrations

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
  1. Create new sql file under "migrations" directory
  2. docker run --rm --env-file <env_filename> --network="host" -v ${PWD}/migrations:/flyway/sql flyway/flyway:6.2.0 migrate

Integration tests

Start test database

  1. 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
  2. Run migrations on test db (See above)

Envrionment

Add the following to a `nextapp/.env.test' file (See nextapp/env.sample):

PGUSER=postgres
PGHOST=localhost
PGPASSWORD=password
PGDATABASE=dogwastewatcher_test
PGPORT=45432

Run tests

  1. cd nextapp
  2. npm install
  3. npm run integration-test

dogwastewatcher's People

Contributors

renovate-bot avatar bmorganpa avatar

Stargazers

 avatar

Watchers

James Cloos avatar

dogwastewatcher's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Replace dependency @material-ui/core with @mui/material
  • Replace dependency @material-ui/icons with @mui/icons-material
  • Replace dependency babel-eslint with @babel/eslint-parser 7.11.0
  • Update dependency @types/jest to v26.0.24
  • Update dependency @types/pg to v7.14.11
  • Update dependency dotenv to v8.6.0
  • Update dependency eslint to v7.32.0
  • Update dependency eslint-plugin-flowtype to v5.10.0
  • Update dependency eslint-plugin-import to v2.28.0
  • Update dependency eslint-plugin-jsx-a11y to v6.7.1
  • Update dependency eslint-plugin-react to v7.33.1
  • Update dependency ts-jest to v26.5.6
  • Update material-ui monorepo (@material-ui/core, @material-ui/icons)
  • Update typescript-eslint monorepo to v4.33.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • Update actions/checkout action to v3
  • Update dependency @types/react-map-gl to v6
  • Update dependency dotenv to v16
  • Update dependency eslint to v8
  • Update dependency eslint-config-prettier to v9
  • Update dependency eslint-config-react-app to v7
  • Update dependency eslint-plugin-flowtype to v8
  • Update dependency graphql to v16
  • Update dependency i18next to v23
  • Update dependency prettier to v3
  • Update dependency react-i18next to v13
  • Update dependency react-map-gl to v7
  • Update dependency typescript to v5
  • Update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • Update postgis/postgis Docker tag to v12
  • Update typescript-eslint monorepo to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/spec.yml
  • actions/checkout v2
.github/workflows/test.yml
  • actions/checkout v2
  • postgis/postgis 11-2.5
npm
nextapp/package.json
  • @apollo/react-common 3.1.4
  • @apollo/react-hooks 3.1.5
  • @apollo/react-ssr 3.1.5
  • @auth0/nextjs-auth0 ^0.13.0
  • @material-ui/core 4.10.0
  • @material-ui/icons 4.9.1
  • @types/ramda 0.27.6
  • @types/react-dom 16.9.8
  • apollo-cache-inmemory 1.6.6
  • apollo-client 2.6.10
  • apollo-link-http 1.5.17
  • apollo-link-schema 1.2.5
  • apollo-server-micro 2.14.0
  • apollo-utilities 1.3.4
  • graphql 15.0.0
  • graphql-tag 2.10.3
  • i18next 19.4.5
  • next 9.4.4
  • pg 8.2.1
  • ramda 0.27.0
  • react 16.13.1
  • react-dom 16.13.1
  • react-i18next 11.5.0
  • react-map-gl 5.2.5
  • wkx 0.5.0
  • @types/jest 26.0.15
  • @types/pg 7.14.7
  • @types/react 17.0.0
  • @types/react-map-gl 5.2.4
  • @typescript-eslint/eslint-plugin 4.8.1
  • @typescript-eslint/parser 4.8.1
  • apollo 2.28.3
  • babel-eslint 10.1.0
  • dotenv 8.2.0
  • eslint 7.14.0
  • eslint-config-prettier 6.15.0
  • eslint-config-react-app 5.2.1
  • eslint-plugin-flowtype 5.2.0
  • eslint-plugin-import 2.22.1
  • eslint-plugin-jsx-a11y 6.4.1
  • eslint-plugin-react 7.21.5
  • eslint-plugin-react-hooks 4.1.2
  • jest 26.6.3
  • prettier 2.1.2
  • ts-jest 26.4.4
  • tsfixturefactory 1.0.1
  • typescript 4.0.5

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.