Skip to content

Instantly share code, notes, and snippets.

View nanzhong's full-sized avatar
👋

Nan Zhong nanzhong

👋
View GitHub Profile
@nanzhong
nanzhong / first.rb
Created October 16, 2012 19:52
Test Gist
puts "First file in gist"
@nanzhong
nanzhong / file1.txt
Created October 18, 2012 01:31 — forked from anonymous/file1.txt
test description
First file
test test test
@nanzhong
nanzhong / file1
Created October 19, 2012 19:39
tests
test 1
source 'https://rubygems.org'
gem 'json'
@nanzhong
nanzhong / Dockerfile
Last active August 29, 2015 14:10
Rails Dokerfile
FROM rails:onbuild
RUN bundle exec rake db:setup
FROM ruby:2.1.5
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN bundle install
RUN apt-get update
RUN apt-get install -y nodejs --no-install-recommends
RUN apt-get install -y mysql-client --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*
EXPOSE 3000
production:
adapter: mysql2
encoding: utf8
database: <%= ENV['MYSQL_ENV_MYSQL_DATABASE'] %>
username: <%= ENV['MYSQL_ENV_MYSQL_USER'] %>
password: <%= ENV['MYSQL_ENV_MYSQL_PASSWORD'] %>
host: <%= ENV['MYSQL_PORT_3306_TCP_ADDR'] %>
port: <%= ENV['MYSQL_PORT_3306_TCP_PORT'] %>
FROM ruby:2.1.5
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
ENV SECRET_KEY_BASE 6dd899954289073958f13101a1903a8e
RUN bundle install
RUN apt-get update
RUN apt-get install -y nodejs --no-install-recommends
RUN apt-get install -y mysql-client --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>