Skip to content

Instantly share code, notes, and snippets.

@holin
Last active February 11, 2017 06:19
Show Gist options
  • Select an option

  • Save holin/8d79a727105c6a7314893290f5e4a74d to your computer and use it in GitHub Desktop.

Select an option

Save holin/8d79a727105c6a7314893290f5e4a74d to your computer and use it in GitHub Desktop.
Phoenix app deploy with distillery

ref:

  1. http://crypt.codemancers.com/posts/2016-10-06-elixir-phoenix-distillery/
  2. http://blog.firstiwaslike.com/elixir-deployments-with-distillery-running-ecto-migrations/
  3. http://www.phoenixframework.org/docs/advanced-deployment

add deps {:distillery, "~> 1.0"}

mix deps.get
mix release.init
brunch build --production
MIX_ENV=prod mix phoenix.digest
MIX_ENV=prod mix release --env=prod

PORT=4000 MIX_ENV=prod mix phoenix.server

** something else

install nodejs ref: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
```
adduser hmlist
su - postgres
psql -u 5433
```
```
CREATE USER hmlist WITH PASSWORD 'secret';
CREATE DATABASE hmlist_prod OWNER hmlist;
GRANT ALL PRIVILEGES ON DATABASE hmlist_prod to hmlist;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment