{"id":15787419,"url":"https://github.com/dunnock/rails-nginx-unicorn","last_synced_at":"2025-06-10T09:32:41.369Z","repository":{"id":99985443,"uuid":"42523992","full_name":"dunnock/rails-nginx-unicorn","owner":"dunnock","description":"Inspired by seapy/dockerfiles, but based on standard ruby also with couple of fixes to nginx","archived":false,"fork":false,"pushed_at":"2016-11-02T19:47:26.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T11:46:25.133Z","etag":null,"topics":[],"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/dunnock.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":"2015-09-15T14:18:45.000Z","updated_at":"2016-11-02T19:47:27.000Z","dependencies_parsed_at":"2023-05-11T10:45:21.075Z","dependency_job_id":null,"html_url":"https://github.com/dunnock/rails-nginx-unicorn","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/dunnock%2Frails-nginx-unicorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunnock%2Frails-nginx-unicorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunnock%2Frails-nginx-unicorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunnock%2Frails-nginx-unicorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunnock","download_url":"https://codeload.github.com/dunnock/rails-nginx-unicorn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunnock%2Frails-nginx-unicorn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259047967,"owners_count":22797627,"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":[],"created_at":"2024-10-04T21:20:21.487Z","updated_at":"2025-06-10T09:32:41.328Z","avatar_url":"https://github.com/dunnock.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails(+ Nginx, Unicorn) Dockerfile Pro\n\nInherited from seapy/rails-nginx-unicorn-pro, extended file upload size up to 20MB\n\nEasy useable docker for rails. more configuration, affordable production.\n\n## What's include\n\n* unicorn, nginx, foreman\n\n\n# Usage\n\n* Create `Dockerfile` to your project and paste below code.\n\n```\n# Dockerfile\nFROM seapy/rails-nginx-unicorn-pro:v1.0-ruby2.2.0-nginx1.6.0\nMAINTAINER seapy(iamseapy@gmail.com)\n\n# Add here your preinstall lib(e.g. imagemagick, mysql lib, pg lib, ssh config)\n\n#(required) Install Rails App\nADD Gemfile /app/Gemfile\nADD Gemfile.lock /app/Gemfile.lock\nRUN bundle install --without development test\nADD . /app\n\n#(required) nginx port number\nEXPOSE 80\n```\n\n* Add `unicorn` gem(maybe uncomment `gem 'unicorn'` in `Gemfile`)\n\n## Build and run docker\n\n```\n# build your dockerfile\n$ docker build -t your/project .\n\n# run container\n$ docker run -d -p 80:80 -e SECRET_KEY_BASE=secretkey your/project\n```\n\n## Screencast\n\n[Easy Ruby On Rails deploy on Docker](http://youtu.be/QgmzBuPuM6I)\n\n\n# Custom pre-install lib\n\nif your rails app required lib like imagemagick(or mysql) you must install that before `Install Rails App` section\n\n## Install imagemagick\n\n```\nRUN apt-get -qq -y install libmagickwand-dev imagemagick\n```\n\n## Install MySQL(for mysql, mysql2 gem)\n\n```\nRUN apt-get install -qq -y mysql-server mysql-client libmysqlclient-dev\n```\n\n## Install PostgreSQL lib(for pg gem)\n\n```\nRUN echo \"deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main\" \u003e /etc/apt/sources.list.d/pgdg.list \u0026\u0026 \\\n    apt-get update \u0026\u0026 \\\n    DEBIAN_FRONTEND=noninteractive \\\n    apt-get install -y --force-yes libpq-dev\n```\n\n## Access bitbucket private repository\n\n```\nRUN mkdir /root/.ssh/\nADD id_rsa /root/.ssh/id_rsa\nRUN touch /root/.ssh/known_hosts\nRUN ssh-keyscan -t rsa bitbucket.org \u003e\u003e /root/.ssh/known_hosts\n```\n\nCopy your `~/.ssh/id_rsa` to `id_rsa` for bitbucket connection. if you don't need to bitbucket connection, create blank `id_rsa`. don't forget add `id_rsa` to `.gitignore`\n\n\n# Customize Nginx, Unicorn, foreman config\n\n## Nginx\n\n```\n# your Dockerfile\n...\nADD config/your-custom-nginx.conf /etc/nginx/sites-enabled/default\n...\n```\n\n## Unicorn\n\nplace your unicorn config to `config/unicorn.rb`\n\n## foreman\n\nplace your Procfile to app root\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunnock%2Frails-nginx-unicorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunnock%2Frails-nginx-unicorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunnock%2Frails-nginx-unicorn/lists"}