https://github.com/jclem/phoenix-template
Heroku-ready template for Phoenix applications
https://github.com/jclem/phoenix-template
elixir phoenix
Last synced: about 1 year ago
JSON representation
Heroku-ready template for Phoenix applications
- Host: GitHub
- URL: https://github.com/jclem/phoenix-template
- Owner: jclem
- Created: 2019-08-21T12:34:24.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T05:36:24.000Z (over 3 years ago)
- Last Synced: 2025-04-10T17:31:12.053Z (about 1 year ago)
- Topics: elixir, phoenix
- Language: Elixir
- Homepage:
- Size: 2.24 MB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phoenix Template
[](https://dashboard.heroku.com/new?template=https://github.com/jclem/phoenix-template/tree/main)
This repository contains the template I use for deploying Phoenix
applications.
## Changes
This template is optimized for deploying to Heroku. It contains the basic
application generated with these `mix phx.new` flags:
```
--live --app=app --module=App --database=postgresql --binary-id
```
For the most part, it's a standard Phoenix application with a few small
tweaks and extra modules:
### Elixir/Phoenix
- [`App.Context`](/lib/app/context.ex) helps set up application context modules.
- [`App.Schema`](/lib/app/schema.ex) helps set up application schemata with common options.
- [`AppWeb`](lib/app_web.ex#L78) contains a `:plug` macro for building plugs.
### Assets
- Styling is provided by [Tailwind](https://tailwindcss.com) and [Open
Color](https://yeun.github.io/open-color/). Tailwind utility class purging is
preconfigured.
- [postcss-nested](https://npm.im/postcss-nested) is provided for nested CSS rules.
### Deployment
Deployment can be done via the "Deploy to Heroku" button above (although you
must update the `template` query parameter in the button URL).
The buildpacks are configured in
[`elixir_buildpack.config`](/elixir_buildpack.config) and
[`phoenix_static_buildpack.config`](/phoenix_static_buildpack.config). If you
are manually creating an application on Heroku, see [app.json](/app.json) for
required environment variables and add-ons.
## Development
To start your Phoenix server:
- Setup the project with `mix setup`
- Start Phoenix endpoint with `mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
## Learn more
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix