infra: CHANGE some cleanup regarding the .env process with container
This commit is contained in:
parent
d0373f0198
commit
8b135a321a
3 changed files with 43 additions and 12 deletions
19
README.md
19
README.md
|
|
@ -52,6 +52,14 @@ mkdir -p images output
|
|||
podman run -v $(pwd)/images:/app/images -v $(pwd)/output:/app/output git.uphillsecurity.com/cf7/shellery:latest
|
||||
```
|
||||
|
||||
With a config file, add `--env-file .env`:
|
||||
|
||||
```bash
|
||||
cp .env.example .env # edit to taste
|
||||
|
||||
podman run --env-file .env -v $(pwd)/images:/app/images -v $(pwd)/output:/app/output git.uphillsecurity.com/cf7/shellery:latest
|
||||
```
|
||||
|
||||
### Local
|
||||
|
||||
- Clone
|
||||
|
|
@ -84,6 +92,10 @@ cp .env.example .env
|
|||
`-e` value passed to the container still wins over the file. Point `ENV_FILE` at another
|
||||
path to use a different file.
|
||||
|
||||
Use plain `KEY=VALUE` and **do not quote values**. The file is parsed, not sourced, so the
|
||||
same file works both locally and with `podman run --env-file`, which would otherwise treat
|
||||
quotes as part of the value. Spaces need no quoting: `GALLERY_TITLE=Holiday 2026`.
|
||||
|
||||
| Variable | Flag | Default | Effect |
|
||||
|---|---|---|---|
|
||||
| `GALLERY_TITLE` | `--title=TEXT` | `Gallery` | Page `<title>` and the `<h1>` header |
|
||||
|
|
@ -101,7 +113,12 @@ podman run -e GALLERY_TITLE="Holiday 2026" -e SHOW_FOOTER=0 \
|
|||
-v $(pwd)/images:/app/images -v $(pwd)/output:/app/output \
|
||||
git.uphillsecurity.com/cf7/shellery:latest
|
||||
|
||||
# container, via a mounted .env
|
||||
# container, via --env-file
|
||||
podman run --env-file .env \
|
||||
-v $(pwd)/images:/app/images -v $(pwd)/output:/app/output \
|
||||
git.uphillsecurity.com/cf7/shellery:latest
|
||||
|
||||
# container, mounting the file instead (equivalent)
|
||||
podman run -v $(pwd)/.env:/app/.env:ro \
|
||||
-v $(pwd)/images:/app/images -v $(pwd)/output:/app/output \
|
||||
git.uphillsecurity.com/cf7/shellery:latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue