Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefangimmillaro/rails-dockerized
Dockerized rails example repo
https://github.com/stefangimmillaro/rails-dockerized
docker docker-compose dockerized-rails psql rails6
Last synced: 12 days ago
JSON representation
Dockerized rails example repo
- Host: GitHub
- URL: https://github.com/stefangimmillaro/rails-dockerized
- Owner: stefangimmillaro
- License: mit
- Created: 2020-07-10T01:27:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T19:59:56.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T14:15:18.681Z (21 days ago)
- Topics: docker, docker-compose, dockerized-rails, psql, rails6
- Language: Ruby
- Homepage:
- Size: 1.26 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockerized Rails 6
Created on Ubuntu 20.04
This is a minimal example for a Dockerized Rails project with the following technologies
* Ruby 2.7.2
* Rails 6.0.3.3
* PostgreSQL 13.0
* Redis 6.0.8
* docker-compose 1.27.4
* Slim-Buster base image## How to
* Install Docker Compose https://docs.docker.com/compose/install/
* Clone repo
* Create a `.env` from `.env.template`. Configure `.env.docker` but keep the DATABASE_HOST as `db`.
* Configure database `config-docker/init.sql` to be consistent with .env
* `$ docker-compose up` (-d to begin build in background) This can take a few minutes
* Once images to come online run `$ docker-compose exec web bundle exec rake db:setup db:migrate` to initialize your virtual database.
* Navigate to http://localhost:3000/ and confirm you see `Rails version: 6.0.3.3` and `Ruby version: ruby 2.7.2p137`## Links
* https://digitalocean.com/community/tutorials/containerizing-a-ruby-on-rails-application-for-development-with-docker-compose
* https://gorails.com/setup/ubuntu/20.04
* https://guides.rubyonrails.org/getting_started.html
* https://github.com/ledermann/docker-rails (More complete and robust than this repo, similar functionality)These pages were helpful guides on getting setup. Thank you to the respective authors.