45 lines
965 B
Markdown
45 lines
965 B
Markdown
Wes' Nonsense Website
|
|
=====================
|
|
|
|
Development
|
|
-----------
|
|
|
|
In development the static files are served by the application. In production
|
|
the expectation is that nginx will do this.
|
|
|
|
```
|
|
flash-watcher -w src -w templates -rn 'cargo dev'
|
|
```
|
|
|
|
If changes are made to the static pages, you need to run `make`.
|
|
|
|
### Images
|
|
|
|
Resize:
|
|
|
|
```
|
|
magic public/images/ulead-photoimpact5.jpg -set filename:name '%t' -resize x240 -quality 80 'public/images/%[filename:name]-thumb.jpg'
|
|
```
|
|
|
|
Bake rotation in:
|
|
|
|
```
|
|
mogrify -auto-orient image.jpg
|
|
```
|
|
|
|
Deployment
|
|
-----------
|
|
|
|
There are two parts:
|
|
|
|
1. Running the Rust binary
|
|
2. Building the static files
|
|
|
|
The Rust binary is installed as a Chimera package and run with dinit.
|
|
`/usr/lib/dinit.d/nonsense.env` is created to set env vars for the
|
|
process.
|
|
|
|
Since the Rust binary needs the templates anyway, the static files are
|
|
built on the host, instead of building them remotely and syncing them.
|
|
|
|
Ensure `git-lfs` is installed.
|