Coder Social home page Coder Social logo

anolson / wednesday_worlds Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 2.22 MB

🚲 A weekly bike ride

Home Page: https://wednesdayworlds.org

Ruby 67.56% JavaScript 0.20% HTML 20.78% SCSS 6.57% Dockerfile 3.36% Shell 1.47% Procfile 0.06%
rails bikes ruby

wednesday_worlds's Introduction

Wednesday Worlds

This is the Rails web application that runs https://wednesdayworlds.org

Download the source

$ git clone git://github.com/anolson/wednesday_worlds.git

Getting Started

$ cd wednesday_worlds
$ bin/setup

Deploy to Heroku

Staging

$ heroku container:push web --app wednesdayworlds-staging
$ heroku container:release web --app  wednesdayworlds-staging

Production

$ heroku container:push web --app wednesdayworlds
$ heroku container:release web --app wednesdayworlds

Generate events

$ heroku run "bin/rake events:generate[YYYY-MM-DD]" --app=wednesdayworlds

Docker

Setup

$ cp .env-sample .env
$ docker compose build --pull web

Start the server

$ docker compose up web

Console

$ docker compose run --rm web bin/rails c

Install gems

$ docker compose run --rm web bundle install

Update gems

$ docker compose run --rm web bundle update rails

Run tests

$ docker compose run --rm test bin/rails spec

Volumes

Reset docker volumes (keep in mind this will remove all postgres data and bundled gems)

$ docker compose down --volumes

Litestream config

STORAGE_MODE=replication
LITESTREAM_REPLICA_URL=s3://wednesdayworlds/data/development.sqlite3
LITESTREAM_ACCESS_KEY_ID=<access_key_id>
LITESTREAM_SECRET_ACCESS_KEY=<secret_access_key>
LITESTREAM_DATA_PATH=/data/db/development.sqlite3

STORAGE_MODE config

  • local – DB only stored locally in db – useful for local development.
  • restore_only – DB restored from S3 (without replication) – useful if you need to replicate data from another host.
  • replication – DB restored from S3 (with replication)

Notes:

  • Bundler needs to be configured with env vars (on Heroku)
  • Make sure that assets are compiled for production
  • Make sure to set RAILS_SERVE_STATIC_FILES=true

https://devcenter.heroku.com/articles/container-registry-and-runtime

License

(The MIT License)

Copyright Β© 2010-2023 Andrew Olson.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the β€˜Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED β€˜AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

wednesday_worlds's People

Contributors

anolson avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.