天天看點

使用distillery&&docker 部署phoenix 應用

distillery 釋出了2.0 了,有好多的新的功能

config prodiver 進行環境變量的配置

appup tansforms 插件系統,友善在release 建構的時候進行修改

mix release.gen.appup 新的mix task

pid 檔案

demo 是一個簡單的phoenix 同時使用docker 進行建構

項目結構

項目建立

添加distillery 支援

配置phoenix endpoint 資訊

建構

distillery release

運作

dockerfile

使用mutil stage 建構

docker-compose

docker 運作環境變量配置

建構&&運作

效果

使用distillery&&docker 部署phoenix 應用

2.0 有好多新特性的添加,後邊會有簡單的使用demo,功能很強大

https://hexdocs.pm/distillery/guides/phoenix_walkthrough.html

https://github.com/rongfengliang/phoenix_distillery-docker-demo