{"id":43019469,"url":"https://github.com/munichmade/elixir-docker-template","last_synced_at":"2026-02-25T17:10:39.071Z","repository":{"id":43496065,"uuid":"319112348","full_name":"munichmade/elixir-docker-template","owner":"munichmade","description":"A boilerplate template for Elixir / Erlang projects based on Docker.","archived":false,"fork":false,"pushed_at":"2025-11-07T21:47:36.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-07T23:26:35.881Z","etag":null,"topics":["docker","elixir","erlang","phoenix","template"],"latest_commit_sha":null,"homepage":"https://github.com/iprods/elixir-docker-template#readme","language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/munichmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-06T19:19:32.000Z","updated_at":"2025-11-07T21:47:03.000Z","dependencies_parsed_at":"2023-02-10T22:16:30.527Z","dependency_job_id":"906e945d-ba98-4bb7-850b-32088f6b3618","html_url":"https://github.com/munichmade/elixir-docker-template","commit_stats":null,"previous_names":["munichmade/elixir-docker-template"],"tags_count":3,"template":true,"template_full_name":null,"purl":"pkg:github/munichmade/elixir-docker-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munichmade%2Felixir-docker-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munichmade%2Felixir-docker-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munichmade%2Felixir-docker-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munichmade%2Felixir-docker-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munichmade","download_url":"https://codeload.github.com/munichmade/elixir-docker-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munichmade%2Felixir-docker-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","elixir","erlang","phoenix","template"],"created_at":"2026-01-31T06:15:29.102Z","updated_at":"2026-02-25T17:10:39.051Z","avatar_url":"https://github.com/munichmade.png","language":"Just","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elixir Docker Template\n\nThis template contains the boilerplate to setup an Elixir application via\nDocker.\n\n## Motivation\n\nAs Elixir (as well as other languages) has different versions and prerequisites\nthis template should help being able to have multiple versions at once. There\nare other ways like f.e. `asdf` to achieve this but for quickly checking out a\nproject for instance Docker is a nice solution.\n\nFurther this should help to get other people onboarded more easily as the stack\nspecifics are \"hidden\" by Docker.\n\nLastly the ability to develop under a production alike system environment might\nhelp to miss some hurdles.\n\n## Features\n\n- Docker based environment for Elixir / Erlang\n- `justfile` for easier handling of the stack\n- Multi-stage Dockerfile for dev and production builds\n\n## Prerequisites\n\nYou need to have the following installed:\n\n- [Docker](https://docker.io) for running the code\n- [Just](https://just.systems) for running commands\n\n## Docker Build\n\nThe template uses a single `docker/Dockerfile` with multiple build stages:\n\n| Stage | Purpose |\n|-------|---------|\n| `base` | Base image with essential tools |\n| `dev` | Development environment (default) |\n| `prod` | Production build environment |\n\n### Build Commands\n\n```bash\n# Development (via compose)\njust start\n\n# Production\ndocker build --target prod -t myapp:prod .\n```\n\nThe versions are defined in the `FROM` statement in the base stage (currently Elixir 1.19.5, Erlang 28.3, Debian trixie).\n\n### Optimized Production Build\n\nFor a smaller production image, you can use a two-stage build pattern. Create a separate `Dockerfile.prod` based on the template's commented sections:\n\n```dockerfile\n# Stage 1: Builder\nFROM docker.io/hexpm/elixir:1.19.5-erlang-28.3-debian-trixie-20260202-slim AS builder\n\nWORKDIR /app\nRUN mix local.hex --force \u0026\u0026 mix local.rebar --force\n\nCOPY mix.exs mix.lock ./\nRUN mix deps.get --only prod\nRUN mix deps.compile\n\nCOPY config/ config/\nCOPY lib/ lib/\nCOPY priv/ priv/\nRUN mix compile\n\nCOPY rel/ rel/\nRUN mix release\n\n# Stage 2: Runtime\nFROM debian:trixie-20260202-slim\n\nRUN apt-get update \u0026\u0026 apt-get install -y --no-install-recommends \\\n  libstdc++6 openssl libncurses6 locales ca-certificates \\\n  \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\nENV LANG=en_US.UTF-8\nWORKDIR /app\n\nCOPY --from=builder /app/_build/prod/rel/your_app ./\nCMD [\"./bin/server\"]\n```\n\n## Usage\n\nTo use the template either download the files and augment an existing project\nor use this template as a starting point.\n\nPer default the template does start an IEx session without anything else.\n\n### Initialize and create a project\n\n\u003eIf you need PostreSQL you first need to uncomment the parts in `compose.yaml`\n\nYou can run `just create` to setup a Mix project. This will open an empty\n`${EDITOR}` instance, e.g. Neovim where you can add the installer command.\n\n```bash\nmix archive.install hex igniter_new --force\nmix archive.install hex phx_new 1.8.1 --force\n\nmix igniter.new req_is_life --with phx.new --with-args \"--database sqlite3\" \\\n  --install ash,ash_phoenix --install ash_sqlite,ash_authentication \\\n  --install ash_authentication_phoenix,ash_oban \\\n  --install oban_web,live_debugger --install usage_rules \\\n  --auth-strategy password --setup --yes\n```\n\nThis will install Ash with some extensions and Phoenix. The result in the\nexample will be placed in the folder `req_is_life`. However it might not be\ndesirable to have a separate folder. Unfortunately `igniter` does not allow\ninstalling in non-empty folders. To overcome this limitation you can add\n\n```bash\nshopt -s dotglob\nmv req_is_life/* .\n```\n\n### Customization of the Docker stack\n\nThe template has a fairly simple stack setup via Docker. But there are some\ncommented lines that can be easily commented in to install f.e. the dependencies\non container start as well as spawning a `phx.server` via the\n`docker/app/run.sh` script and/or add a database via the `docker-compose.yml`.\n\n#### Renaming containers\n\nYou might want to adapt the naming of the Docker stack containers like use something\nmore meaningful than f.e. `app` for the application container. Please check\nand replace occurrences in the following file:\n\n- Change `compose.yml`\n- Adapt `justfile`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunichmade%2Felixir-docker-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunichmade%2Felixir-docker-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunichmade%2Felixir-docker-template/lists"}