Code Monkey home page Code Monkey logo

docker-rails-webpack-postgres's Introduction

docker-rails-webpack-postgres

This repo is used as a template to get started with a development environment using Docker Compose, Rails, Webpack (using Yarn), and Postgress.

Required###

You need to have docker installed and running

Installation###

Create the database:

# Move rails/secrets.sample.yml file
mv rails/config/secrets.sample.yml rails/config/secrets.yml

# Generate new token & copy output to .env SECRET_KEY_BASE
cd rails && bundle exec rake secret

# Build images and boot
docker-compose build
docker-compose up

# Create the new database
docker-compose run web bundle exec rails db:create

Start/stop###

docker-compose up # this is used to boot
docker-compose down # this is used to shutdown

Notes

A volume will be created on the host machine for the data to allow for persistent data. No need to reseed your database.

Read more about Docker compose

TODO###

  • would be nice to have a setup script that
    • renames all files with 'drwp' entries to a custom name (project)
      • rails/config/database.yml
      • rails/config/environments/production.rb
      • rails/config/initializers/session_store.rb
      • rails/app/views/layouts/application.html.erb
      • rails/config/application.rb
      • webpack/package.json
      • README.md
    • generate secret.yml, new secret token, and create db
      • mv rails/config/secrets.sample.yml to secrets.yml
      • rake secret and place in .env file
      • rake db:create
      • rake db:migrate
    • removes git remote origin and adds new origin

docker-rails-webpack-postgres's People

Contributors

nateleavitt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

shamane

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.