This repo is used as a template to get started with a development environment using Docker Compose, Rails, Webpack (using Yarn), and Postgress.
You need to have docker installed and running
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:createdocker-compose up # this is used to boot
docker-compose down # this is used to shutdownA 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
- 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
- renames all files with 'drwp' entries to a custom name (project)