Skip to content

Instantly share code, notes, and snippets.

@daisuke-morita
daisuke-morita / Dockerfile
Created Feb 6, 2016
Elixirビルド用Dockerfile
View Dockerfile
FROM ubuntu:trusty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -q
RUN apt-get -y install language-pack-ja openssl libssl-dev ncurses-dev curl git
RUN update-locale LANG=ja_JP.UTF-8
# SSH
RUN mkdir -p /root/.ssh
@daisuke-morita
daisuke-morita / circle.yml
Created Feb 6, 2016
Elixirのビルド・デプロイ
View circle.yml
machine:
timezone:
Asia/Tokyo
services:
- docker
node:
version: 5.1.0
dependencies:
cache_directories:
@daisuke-morita
daisuke-morita / cloud-boothook.sh
Created Feb 6, 2016
Cloud-init経由でConformの設定ファイルを配置
View cloud-boothook.sh
#cloud-boothook
#!/bin/sh
# Application config
cat <<EOF > /opt/example_app/app.conf
logger.level = info
Endpoint.url.host = "example.com"
Endpoint.url.port = 443
@daisuke-morita
daisuke-morita / config.exs
Created Feb 6, 2016
Elixirプロジェクトの設定ファイル例
View config.exs
use Mix.Config
config :example_app,
key1: "value1",
key2: "value2"
import_config "#{Mix.env}.exs"
@daisuke-morita
daisuke-morita / mix.ex
Created Feb 6, 2016
mix.ex - バージョン番号の自動生成と Elixir Release Manager の導入
View mix.ex
defmodule ExampleApp.Mixfile do
use Mix.Project
def project do
[
app: :example_app,
version: version(),
elixir: "~> 1.2.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,