All Projects → beardedeagle → Alpine Phoenix Builder

beardedeagle / Alpine Phoenix Builder

Licence: mit
Up to date Alpine image with the latest language versions for staged Elixir and Phoenix builds.

Programming Languages

elixir
2628 projects
erlang
1774 projects

Projects that are alternatives of or similar to Alpine Phoenix Builder

Phoenix gon
🔥 Phoenix variables in your JavaScript without headache.
Stars: ✭ 84 (+18.31%)
Mutual labels:  phoenix, hex
ecto profiler
Project for Ecto DB profiling
Stars: ✭ 16 (-77.46%)
Mutual labels:  hex, phoenix
gleam compile
Tiny hex package to make the development experience of using gleam in elixir (and especially phoenix projects) better.
Stars: ✭ 29 (-59.15%)
Mutual labels:  hex, phoenix
Package.json
文件 package.json 的说明文档。
Stars: ✭ 67 (-5.63%)
Mutual labels:  npm
Node Installed Check
Checks that all dependencies in your package.json have supported versions installed and complies with your specified node engine version range
Stars: ✭ 67 (-5.63%)
Mutual labels:  npm
Swift Playground Templates
🏫 A collection of helpful Xcode playground templates.
Stars: ✭ 69 (-2.82%)
Mutual labels:  makefile
Aws Lambda Swift Sprinter
AWS Lambda Custom Runtime for Swift with swift-nio 2.0 support
Stars: ✭ 70 (-1.41%)
Mutual labels:  makefile
Wallaby
Concurrent browser tests with elixir
Stars: ✭ 1,143 (+1509.86%)
Mutual labels:  phoenix
Dockerfiles
lots of dockerfiles, based on alpine
Stars: ✭ 69 (-2.82%)
Mutual labels:  alpine
Hellogopher
Hellogopher: "just clone and make" your conventional Go project
Stars: ✭ 1,159 (+1532.39%)
Mutual labels:  makefile
Imagefilters
Image Filter is an Android Libary that lets you to Filtering any image
Stars: ✭ 68 (-4.23%)
Mutual labels:  makefile
Npm Api
Node.js library for getting info from NPM’s API
Stars: ✭ 67 (-5.63%)
Mutual labels:  npm
Ssri
Standard Subresource Integrity library for Node.js
Stars: ✭ 69 (-2.82%)
Mutual labels:  npm
Markdown Builder
1kb Markdown builder for Node.js
Stars: ✭ 67 (-5.63%)
Mutual labels:  npm
Injectdemo
Stars: ✭ 69 (-2.82%)
Mutual labels:  makefile
Telephony
The telephony packages feed
Stars: ✭ 66 (-7.04%)
Mutual labels:  makefile
Translation
translation work flow
Stars: ✭ 69 (-2.82%)
Mutual labels:  makefile
Cpython Emscripten
Python in the browser - CPython compiled with emscripten
Stars: ✭ 68 (-4.23%)
Mutual labels:  makefile
Npm Link Up
🔄 Link your NPM projects automatically, for sophisticated / modular local development.
Stars: ✭ 68 (-4.23%)
Mutual labels:  npm
Flappy Phoenix
🐦 Flappy Bird clone written in Elixir using Phoenix LiveView to render the game UI from the server.
Stars: ✭ 69 (-2.82%)
Mutual labels:  phoenix

Docker + Alpine + Elixir && Phoenix = Love

This Dockerfile provides a good base build image to use in multistage builds for Elixir and Phoenix apps. It comes with the latest version of Alpine, Erlang, Elixir, Rebar, Hex, NodeJS and NPM. It is intended for use in creating release images with or for your application and allows you to avoid cross-compiling releases. The exception of course is if your app has NIFs which require a native compilation toolchain, but that is an exercise left to the user.

No effort has been made to make this image suitable to run in unprivileged environments. The repository owner is not responsible for any losses that result from improper usage or security practices, as it is expected that the user of this image will implement proper security practices themselves.

Software/Language Versions

Alpine 3.13.1
OTP/Erlang 23.2.3
Elixir 1.11.3
Rebar 3.14.3
Hex 0.21.1
Nodejs 15.8.0
NPM 7.5.2
Git 2.30.0

Usage

To boot straight to a iex prompt in the image:

$ docker run --rm -i -t beardedeagle/alpine-phoenix-builder iex
Erlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]

Interactive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>

For your own application:

  • Using Elixir releases
FROM beardedeagle/alpine-phoenix-builder:1.11.3 as builder
ENV appdir /opt/test_app
WORKDIR ${appdir}
COPY . ${appdir}
RUN mix deps.get --only prod \
  && MIX_ENV=prod mix compile \
  && cd assets \
  && npm install \
  && node node_modules/webpack/bin/webpack.js --mode production \
  && cd ${appdir} \
  && MIX_ENV=prod mix phx.digest \
  && MIX_ENV=prod mix release \
  && V=0.1.0; pushd _build/prod/rel; tar -czvf ${appdir}/test_app-${V}.tar.gz test_app; popd;

FROM alpine:3.13.1
EXPOSE 4000
ENV appver 0.1.0
WORKDIR /opt/test_app
COPY --from=builder /opt/test_app/test_app-${appver}.tar.gz .
RUN apk add --no-cache bash libressl \
  && tar -xzvf test_app-${appver}.tar.gz \
  && rm -rf test_app-${appver}.tar.gz \
  && rm -rf /root/.cache \
  && rm -rf /var/cache/apk/*
CMD ["bin/test_app", "start"]
  • Using Distillery
FROM beardedeagle/alpine-phoenix-builder:1.11.3 as builder
ENV appdir /opt/test_app
WORKDIR ${appdir}
COPY . ${appdir}
RUN mix deps.get --only prod \
  && MIX_ENV=prod mix compile \
  && cd assets \
  && npm install \
  && node node_modules/webpack/bin/webpack.js --mode production \
  && cd ${appdir} \
  && MIX_ENV=prod mix phx.digest \
  && MIX_ENV=prod mix release --env=prod

FROM alpine:3.13.1
EXPOSE 4000
ENV appver 0.1.0
WORKDIR /opt/test_app
COPY --from=builder /opt/test_app/_build/prod/rel/test_app/releases/${appver}/test_app.tar.gz .
RUN apk add --no-cache bash libressl \
  && tar -xzvf test_app.tar.gz \
  && rm -rf test_app.tar.gz \
  && rm -rf /root/.cache \
  && rm -rf /var/cache/apk/*
CMD ["bin/test_app", "foreground"]

History

The code provided by PR #1 is MIT licensed by GoDaddy. Any code changes after that are MIT licensed by the repository owner.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].