grim/containers/trac-bootstrap

Beef up the readme
draft
2021-04-11, Gary Kramlich
2338a63e5d7e
Beef up the readme
# trac-bootstrap
trac-bootstrap is meant to be used an in initContainer in kubernetes to
initialize a trac instead from a backup that's stored in an s3 compatible
provider.
## Configuration
This image requires a number of environment variables
* `S3_URL` Is the URL to your S3 bucket.
* `S3_KEY` The key in S3 that holds your trac backup.
* `S3_ACCESS_KEY` The S3 access key.
* `S3_SECRET_KEY` The S3 secret access key.
* `DESTINATION` The destination path in the container to extrac the backup to.
These environment variables are used to create an alias in mc and then extract
the backup with the following commands.
```
mc alias set trac-bootstrap "${S3_URL}" "${S3_ACCESS_KEY}" "${S3_SECRET_KEY}"
mc cat "trac-bootstrap/${S3_KEY}" | tar -C "${DESTINATION}"
```
Note these commands are copied from [bootstrap][bootstrap] and may have not
always get updated. Please double check the file if you need to.
## Running
If this container finds an existing `${DESTINATION}/conf/trac.ini` it will
assume that the bootstrap is already complete and exit successfully. This
means you can happily leave the init container around forever and in the event
something should happen to your volume mount, it'll fix it.