Skip to content

conormb/scoutplan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,476 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

Welcome to Scoutplan

Assumptions & prerequisites

  • You have a FontAwesome kit defined

  • Docker & docker-compose installed

  • Google Places API credentials

  • Honeybadger account

  • ScoutAPM account

  • Twilio account with SMS enabled

  • S3-compatible storage (coded against DigitalOcean)

Set up local HTTPS

Docker-compose includes Caddy for serving the app through TLS locally.

See https://codewithhugo.com/docker-compose-local-https/ for inspiration

  • brew install mkcert

  • mkcert -install

  • in your hosts file (e.g. /etc/hosts): 127.0.0.1 local.scoutplan.org

Rails credentials

  • twilio.account_sid
  • twilio.auth_token

ENV vars (.env in dev, K8S in production as described below)

Secrets (stored as Kubernetes secrets)

  • DATABASE_PASSWORD
  • DO_STORAGE_SECRET (S3-compatible storage at Digital Ocean)
  • MAPBOX_TOKEN (requires a Mapbox account)
  • RAILS_MASTER_KEY
  • SECRET_KEY_BASE (generated by Rails)
  • SENTRY_DSN (requires a Sentry.io subscription)
  • SKYLIGHT_AUTHENTICATION (requires a Skylight subscription)
  • SMTP_PASSWORD
  • OPENWEATHER_API_KEY

Config vars (stored as Kubernetes configmap)

  • APP_HOST (e.g. my.app.com)
  • DATABASE_HOST (expects a Postgres server)
  • DATABASE_NAME
  • DATABASE_PORT
  • DATABASE_USER
  • DO_BUCKET
  • DO_STORAGE_ENDPOINT
  • DO_STORAGE_KEY_ID
  • DO_STORAGE_REGION
  • FONT_AWESOME_KIT_ID (requires a Fontawesome subscription)
  • MAILGUN_INGRESS_SIGNING_KEY
  • RAILS_ENV
  • RAILS_SERVE_STATIC_FILES (set to true in production)
  • REDIS_URL
  • SMTP_ADDRESS
  • SMTP_DOMAIN
  • SMTP_PORT
  • SMTP_USERNAME
  • TWILIO_NUMBER
  • TWILIO_SID

Docker Compose

Create docker-compose.override.yml in the project root and populate thusly:

services:
  db:
    image: postgres:13-alpine
    command: ["postgres", "-c", "fsync=false", "-c", "full_page_writes=off"]
    environment:
      POSTGRES_PASSWORD: password
    volumes:
      - ./tmp/db:/var/lib/postgresql/data
    ports:
      - "5432:5432"
  app:
    depends_on:
      - db

Tag and push the image to DO...

docker tag scoutplan_app registry.digitalocean.com/scoutplan/scoutplan_app
docker push registry.digitalocean.com/scoutplan/scoutplan_app

Tailwind build

In a separate terminal, run rails tailwindcss:watch

Email in development

The Docker Compose stack includes mailcatcher. Once the stack's up, visit http://localhost:1080 to see your mail

Flipper

Features are gated by Flipper and need to be enabled:

  • :receive_event_publish_notice
  • :receive_bulk_publish_notice
  • :receive_rsvp_confirmation
  • :receive_digest

Sources

Sign-in page background: https://heropatterns.com/

Testing

Run specs from command line: rspec

Load testing: https://octoperf.com/blog/2017/10/26/how-to-install-jmeter-mac/

SSL configuration: https://www.ssllabs.com/ssltest/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 49.2%
  • Slim 37.9%
  • JavaScript 7.6%
  • HTML 2.9%
  • CSS 2.2%
  • Shell 0.1%
  • Other 0.1%