{"id":16747117,"url":"https://github.com/selfup/devopsone","last_synced_at":"2025-04-10T13:43:37.885Z","repository":{"id":71266507,"uuid":"48342496","full_name":"selfup/DevOpsOne","owner":"selfup","description":"Production Server Scripts (rbenv, ruby, rails, nodejs, postgres) for Rails Production/Setup","archived":false,"fork":false,"pushed_at":"2017-07-04T19:57:11.000Z","size":45,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T12:21:53.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selfup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-21T00:26:52.000Z","updated_at":"2024-11-25T15:10:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c06dcdc-17b6-4fcc-b495-c4ea4062f154","html_url":"https://github.com/selfup/DevOpsOne","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/selfup%2FDevOpsOne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2FDevOpsOne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2FDevOpsOne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2FDevOpsOne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfup","download_url":"https://codeload.github.com/selfup/DevOpsOne/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226366,"owners_count":21068191,"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-13T02:09:09.573Z","updated_at":"2025-04-10T13:43:37.878Z","avatar_url":"https://github.com/selfup.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevOpsOne\n\n##### For Ruby (2.3.0), Rails (4.2.5), rbenv, rbenv-vars, Ubuntu (12.04 - 15.10), and Postgres (9.4 - 9.5)\n\n##### Also works on Raspbian (Raspberry Pi) and Debian!\n\n# Different Paths to Take From This README\n\n* OSX intructions are at the bottom for devs wanting to run production locally or to make sure everything works before pushing to Heroku.\n\n* Looking for a Dockerfile that sets up a container for you? Go to this repo I made! - [DockerOne](https://github.com/selfup/DockerOne)\n\n* **All Things Debian are in the *How to Use (Ubuntu)* section**\n\n\n\n# Instructions and Reason/Purpose\n\n##### Please copy and paste scripts line by line! This will ensure that everything works as planned.\n\n* You can then run my production scripts for rails once you clone and bundle a repo\n\nWhen on Ubuntu, a DB needs to be created with the same name as the username that rails autogenerates in the config/database.yml file\n\nThere are a few from scratch setup scripts written in python that will setup the desired enviornment. Should take 5-10 minutes depending on how long it takes to compile ruby on your VPS/Machine.\n\nOnce ruby/rails/node/postgres are installed the ruby script will hook everything up to an app that you clone down.\n\nThe idea here is to create a ```valid database.yml``` file, as well as set correct ```ENV``` variables in a ```.rbenv-vars``` file.\n\nRun the ruby script for the correct machine state (VM, VPS, Desktop, OSX), and your app will be production ready!\n\n# How To Use (Ubuntu)\n\n#### To create valid ENV vars/PG user/database.yml\n\n[production_ready_rails_ubuntu](https://gist.github.com/selfup/8552639296105b464750)\n\n### To setup from scratch:\n\n#### On a Ubuntu/Debian Server\n\n[server_from_scratch_gist](https://gist.github.com/selfup/24d5901b0610fdbf7692)\n\n#### On a Ubuntu/Debian/Raspbian Desktop\n\n[desktop_from_scratch_gist](https://gist.github.com/selfup/3449f7671d5492506cc7)\n\n#### On a Vagrant hashicorp/precise32 box and or bento/debian-8.2 box\n\n[vagrant_box_from_scratch_gist](https://gist.github.com/selfup/025dab4b72f5d9d56e10)\n\n##### My next feautre is to automagically create the password based on your ARGV[0] for the new pg user as well as write a CHEF recipe to do this all for you when provisioning new VM's or VPS's.\n\n#### One script to automate the whole process!\n\n# OSX\n\nI made an extra script for OSX that can handle both creating a valid database.yml and ENV variables for figaro or .rbenv-vars\n\nThis script will ```.gitignore``` ```application.yml``` if ```which ruby``` returns rvm.\n\nMake sure to ```figaro install``` prior to using this script if you use figaro!\n\n**Clone this at root!**\n\nCd into your app directory:\n\n    ruby ~/DevOpsOne/create_db_yml_OSX.rb someRandomPasswordHere\n\n    RAILS_ENV=production rake db:setup\n    RAILS_ENV=production rake assets:precompile\n    RAILS_ENV=production rails s\n\nThat's it!\n\nIf you are using Fish add ```env``` infront of ```RAILS_ENV=production```\n\nExample: ```env RAILS_ENV=production rake db:setup```\n\nMy script assumes that if ```which ruby``` returns rbenv, that you have rbenv-vars. If it outputs ```rvm``` then it will add the new ENV variables to your application.yml\n\n**Please be *sure* to add either .rbenv-vars OR application.yml to your .gitignore!**\n\nThis is an OpenSource Project. Pull requests accepted!\n\nI officially released this to the public on Christmas Day 2015. Enjoy it!\n\nWhat it feels like:\n\n![](https://i.imgur.com/LXg0mHe.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fdevopsone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfup%2Fdevopsone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fdevopsone/lists"}