Code Monkey home page Code Monkey logo

wawd's Introduction

WAWD

Notice: the project is not yet fully implemented.

A template Rails project with Web And Worker Dockerized in single container.
Especially useful to run on Heroku in scope of single dyno. Such approach will relieve you from running additional Worker node. Meaning you can even run the application on free dyno and keep processing background jobs.

Find more detailed explanation here:
Dockerized Rails with Background Worker in single container

Including:

  1. Adapted to run on Heroku in Docker Deployment Mode
  2. Included docker-compose.yml for running with Docker Compose in self-hosted environment
  3. Configured for default Heroku Postgres database;
  4. Configured to cache gems in case of running with Docker Compose;
  5. Entrypoint script with automatic migrations run and DB creation when needed;
  6. Configured supervisord to run multiple processes in single container;
  7. Installed and configured DelayedJob
  8. Installed a UI for DelayedJob delayed_job_web

Running in self-hosted env

docker-compose up

Deploying to Heroku

...

Follow instructions gere to configure your Heroku app for Docker deployment: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

Notice: Remember to add: config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT)) to config/application.rb in order to allow Puma to write request logs into STDOUT

(TODO) Run in development: ...

wawd's People

Contributors

olzv avatar

Stargazers

 avatar  avatar

wawd's Issues

Wait for db on first startup

until pg_isready --username=postgres --host=postgres; do
  >&2 echo "Postgres is unavailable - sleeping"
  sleep 1
done

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.