Skip to content

Instantly share code, notes, and snippets.

View dmitryrck's full-sized avatar

Dmitry L Rocha dmitryrck

View GitHub Profile
@dmitryrck
dmitryrck / .gitignore
Last active May 16, 2017 23:26
minitest.cr
/doc/
/lib/
/bin/
/.shards/
@dmitryrck
dmitryrck / Dockerfile
Last active June 26, 2022 14:48
Ruby project using docker. This is a boilerplate, for instructions see https://dmitryrck.com/zero-to-up-and-running-ruby-project/
from ruby
env DEBIAN_FRONTEND=noninteractive \
NODE_VERSION=10.1.0
run sed -i "/deb-src/d" /etc/apt/sources.list && \
wget -q -O- https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y build-essential libpq-dev postgresql-client google-chrome-stable && \
from ubuntu
env DEBIAN_FRONTEND noninteractive
run sed -i '/deb-src/d' /etc/apt/sources.list && apt-get update
run useradd -m -s /bin/bash -u 1000 dmitryrck
run apt-get install --yes python python-pip && pip install udemy-dl
@dmitryrck
dmitryrck / setup
Last active April 15, 2017 17:24
Zero to Up and Running a Rails Project only using Docker - bin/setup
#!/bin/bash
set -xe
# Uncomment this line and ensure your config/database.yml.sample is ready to run with docker.
# cp config/database.yml.sample config/database.yml
docker-compose run --rm -u root web bash -c "mkdir -p /bundle/vendor && chown railsuser /bundle/vendor"
docker-compose run --rm web bundle install
docker-compose run --rm web bundle exec rake db:setup
@dmitryrck
dmitryrck / README.md
Last active September 10, 2017 22:01
Zero to Up and Running a Rails Project only using Docker - README

My Blog

Running

Setup:

% docker-compose run --rm -u root web bash -c "mkdir -p /bundle/vendor && chown railsuser /bundle/vendor"
% docker-compose run --rm web bundle install
% docker-compose run --rm web bundle exec rake db:setup
@dmitryrck
dmitryrck / database.yml
Last active April 15, 2017 17:24
Zero to Up and Running a Project with Rails - database.yml with PostgreSQL
development: &default
adapter: postgresql
database: myblog_development
encoding: unicode
host: db
username: postgres
password:
pool: 5
test:
@dmitryrck
dmitryrck / docker-compose.yml
Last active April 15, 2017 17:24
Zero to Up and Running a Project with Rails - docker-compose.yml with PostgreSQL
version: "2"
services:
web:
build: .
volumes:
- .:/app
- bundle_path:/bundle
environment:
- BUNDLE_PATH=/bundle/vendor
@dmitryrck
dmitryrck / Dockerfile
Last active April 15, 2017 17:24
Zero to Up and Running a Project with Rails - Dockerfile with PostgreSQL
from ruby
env DEBIAN_FRONTEND=noninteractive \
NODE_VERSION=6.9.1
run sed -i '/deb-src/d' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y build-essential libpq-dev postgresql-client
run curl -sSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" | tar xfJ - -C /usr/local --strip-components=1 && \
@dmitryrck
dmitryrck / Gemfile
Created November 9, 2016 02:23
Zero to Up and Running a Project with Rails - Gemfile
source "https://rubygems.org"
gem "rails"
@dmitryrck
dmitryrck / docker-compose.yml
Last active April 15, 2017 17:24
Zero to Up and Running a Project with Rails - docker-compose.yml
version: "2"
services:
web:
build: .
volumes:
- .:/app
- bundle_path:/bundle
environment:
- BUNDLE_PATH=/bundle/vendor