{"id":21157061,"url":"https://github.com/yano3nora/railsdock","last_synced_at":"2026-05-07T18:13:28.604Z","repository":{"id":100274952,"uuid":"151969695","full_name":"yano3nora/railsdock","owner":"yano3nora","description":"Ruby on Rails 5 on Docker.","archived":false,"fork":false,"pushed_at":"2019-10-02T09:32:15.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T09:07:49.476Z","etag":null,"topics":["docker","rails","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yano3nora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-07T17:57:33.000Z","updated_at":"2019-10-02T09:32:17.000Z","dependencies_parsed_at":"2023-05-13T09:30:27.139Z","dependency_job_id":null,"html_url":"https://github.com/yano3nora/railsdock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Frailsdock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Frailsdock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Frailsdock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Frailsdock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yano3nora","download_url":"https://codeload.github.com/yano3nora/railsdock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243599083,"owners_count":20317050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","rails","ruby"],"created_at":"2024-11-20T11:59:02.607Z","updated_at":"2026-05-07T18:13:23.570Z","avatar_url":"https://github.com/yano3nora.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Docker + Ruby on Rails.\n===\n\n## Requirements\n- docker\n- docker-compose\n\n## Containers\n- db\n  - PostgreSQL 10.5 ( On development )\n- redis\n  - Redis 5.0.3\n- web\n  - ruby 2.5.3\n  - rails 5.2\n  - nginx 1.14\n\n## Build\n\u003e In the first time of build.\n\n```\n# Set up env.\n$ cp .env.development .env\n$ vi .env  # Edit SMTP, and add a RAILS_MASTER_KEY ( If you need ).\n$ docker-compose run --rm web rails new . --database=postgresql\n\u003e Overwrite /app/Gemfile? y\n$ sudo chown -R $USER:$USER .  # If building onto Linux.\n\n# Set configurations.\n$ cp .provisions/* config\n$ rm -rf .provisions\n\n# Build containers.\n$ docker-compose run --rm web bundle install\n$ docker-compose build\n\n# Create databases.\n$ docker-compose run --rm web rake db:setup\n$ docker-compose run --rm web rake db:migrate\n$ docker-compose up -d\n```\n\n## Deployment\n### On Development\n```\n$ docker-compose up     # Attach mode.\n$ docker-compose up -d  # Detach mode.\n\n# Accessing to docker-machine IP via 80 port by your browser.\n# Retry after one moment please if you received 5xx response.\n```\n\n#### Commands\n```\n# Re-setup Database.\n$ docker-compose run --rm web rake db:drop\n$ docker-compose run --rm web rake db:create\n$ docker-compose run --rm web rake db:migrate\n$ docker-compose run --rm web rake db:seed\n\n# Clear log / cache.\n$ docker-compose run --rm web rake tmp:cache:clear\n$ docker-compose run --rm web rake log:clear\n\n# Launch bash.\n$ docker-compose exec web bash\n\n# Shutdown containers.\n$ docker-compose down\n\n\n# Add Migrations.\n$ docker-compose run --rm web rails g model Article subject:string body:text user:references\n$ docker-compose run --rm web rake db:migrate\n\n# Add Packages.\n$ vi Gemfile\n\u003e gem 'seedbank'\n$ docker-compose run --rm web bundle install\n$ docker-compose build\n```\n\n### On Production\n```\n# Login Heroku \u0026 Heroku Container Registry.\n$ heroku login\n$ heroku auth:token\n\u003e xxxx-xxxx-xxxx-xxxx\n$ docker login registry.heroku.com\n\u003e Username: heroku-user-name\n\u003e Password: xxxx-xxxx-xxxx-xxxx\n\n# Setting environment variables.\n# @see     .env.development\n# @see     https://dashboard.heroku.com/apps/${APP_NAME}/settings\n# @exapmle $ heroku config:set RAILS_ENV=production\n#          $ heroku config:set RAILS_MASTER_KEY=xxxxxxxxxx\n#          $ heroku config:set DATABASE_URL=xxxxxxxxxxxxxx\n$ cp .env.development .env  # Generate dummy .env file for production.\n\n# Setup front-end files before container building.\n# e.g. ) $ npm run build\n\n# Push \u0026 Release Container onto Heroku Container Registry\n$ heroku container:push web -a ${APP_NAME} --arg RAILS_ENV=production,DOMAIN=${APP_DOMAIN}\n$ heroku container:release web -a ${APP_NAME}\n\n# Reset \u0026 Migrate Database ( If you need ).\n# @see https://dashboard.heroku.com/apps/${APP_NAME}/settings\n$ heroku pg:reset DATABASE_URL -a ${APP_NAME}\n$ heroku run -a ${APP_NAME} rake db:migrate\n$ heroku run -a ${APP_NAME} rake db:seed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3nora%2Frailsdock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyano3nora%2Frailsdock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3nora%2Frailsdock/lists"}