Skip to content

Instantly share code, notes, and snippets.

View nanzhong's full-sized avatar
👋

Nan Zhong nanzhong

👋
View GitHub Profile
@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"] %>
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'] %>
@nanzhong
nanzhong / gist:822fb551b9da6e67e1b0
Created February 22, 2015 04:58
Updated emacs theme
;;; monokai-theme.el --- A fruity color theme for Emacs.
;; Copyright (C) 2011-2013
;; Author: Kelvin Smith <oneKelvinSmith@gmail.com>
;; URL: http://github.com/oneKelvinSmith/monokai-emacs
;; Version: 0.2.0
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@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