Skip to content

Instantly share code, notes, and snippets.

View kbrown's full-sized avatar

Kevin Brown kbrown

View GitHub Profile

Using Elixir releases and multi-stage Docker files to simplify Phoenix deployment

This repo is my experiment in deploying a basic Phoenix app using the release feature from elixir 1.9 (https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/) and docker, via a multi-stage Dockerfile (https://docs.docker.com/develop/develop-images/multistage-build/) leveraging bitwalker's docker images for Elixir and Phoenix.

Step 1: Install Elixir 1.9.1 (and Erlang)

The simplest way to manage Elixir versions is to use asdf.

@yatsu
yatsu / pyenv-python38-macos.sh
Created January 2, 2021 11:35
Install Python 3.8.6 with pyenv on macOS Big Sur (11)
#!/bin/sh
# 1) Install Xcode 12
# 2) Install command line tools: `xcode-select --install`
# 3) Install Homebrew
# 4) brew install zlib bzip2 xz
CFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix xz)/include" \
LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix xz)/lib" \
pyenv install 3.8.6
steps:
- name: 'gcr.io/cloud-builders/git'
entrypoint: /bin/bash
args:
- -c
- |
git fetch --depth=2 origin main
echo hello
git log