Use a URL to Connect to the DB
For actual deployments, a URL is easier to use.
Set the URL via an Environment Variable
This is for route generation to be able to not just be `example.com`.
First pass at a NixOS Module for Deployment
It should be secret friendly. Does not currently set up databases, etc.,
but should start and stop the service at least!
Set up Nix Build for Release
`nix build .#home` will build a mix release for the application that
can (currently) be configured with the following environment variables:
- `DATABASE_URL`: A URL describing the database to connect to, of the
- `POOL_SIZE`: The DB connection pool size
- `SECRET_KEY_BASE`: Usually generated via `mix phx.gen.secret`
- `PORT`: The port to listen on
- `TZ_DATA_DIR`: The directory to cache timezone data. Needed, as the
default value is the release directory, which is read-only when
launched via nix.
It also seems tailwind's jit was folded into the mainline, so that got
bumped here as part of making the build work.
Add Atom Feed
Why atom? They seem roughly the same and also there's an easy builder
for atom feeds.
Upgrade to Webpack 5 and Tailwind JIT
It seems webpack 4 has issues watching files outside of its working
directory, but 5 does not.
Generate Blog Apps
These apps will handle storing and displaying posts, comments.
Generated Phoenix 1.5.8 umbrella application