Skip to content

Commit

Permalink
Add docker-compose notes (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
brotandgames committed Aug 22, 2019
1 parent 0e2be28 commit dd13b40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ services:
ports:
- '8090:3000'
environment:
- SECRET_KEY_BASE="sensitive_secret_key_base"
- SECRET_KEY_BASE=sensitive_secret_key_base
- SMTP_ADDRESS=smtp.yourhost.com
- SMTP_EMAIL_FROM="ciao@yourhost.com"
- SMTP_EMAIL_TO="you@yourhost.com"
- SMTP_EMAIL_FROM=ciao@yourhost.com
- SMTP_EMAIL_TO=you@yourhost.com
- SMTP_PORT=587
- SMTP_AUTHENTICATION=plain
- SMTP_DOMAIN=smtp.yourhost.com
- SMTP_ENABLE_STARTTLS_AUTO=auto
- SMTP_USERNAME=ciao
- SMTP_PASSWORD="sensitive_password"
- SMTP_PASSWORD=sensitive_password
volumes:
- /opt/ciao/data:/app/db/sqlite/
````
Expand All @@ -120,6 +120,8 @@ docker-compose up -d

Open localhost:8090 in the webbrowser.

*Note: if you have problems with environment variables (quoting, spaces etc), take a look at these GitHub issues ([1](https://github.com/brotandgames/ciao/issues/40), [2](https://github.com/docker/compose/issues/2854)) and these Stack Overflow questions ([1](https://stackoverflow.com/questions/53082932/yaml-docker-compose-spaces-quotes), [2](https://stackoverflow.com/questions/41988809/docker-compose-how-to-escape-environment-variables))*.

### Via Git clone

````
Expand Down Expand Up @@ -197,7 +199,7 @@ curl -X DELETE -H "Content-type: application/json" /checks/<:id>.json

State is stored in an internal SQLite database located in `db/sqlite/production.sqlite3`.

*NOTE: Prior to version 1.1.0 the database was located in `db/` (missing sqlite subfolder). From 1.1.0 onwards the location is `db/sqlite/` to enable docker to use a volume.*
*Note: Prior to version 1.1.0 the database was located in `db/` (missing sqlite subfolder). From 1.1.0 onwards the location is `db/sqlite/` to enable docker to use a volume.*

### Backup

Expand Down
6 changes: 5 additions & 1 deletion webhook_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ There are 5 placeholders which you can use in the payload:
* `__status_after__`
* `__check_url__`

ENV variable `CIAO_WEBHOOK_PAYLOAD_$NAME` has to be a valid JSON one-liner wrapped in single quotes like `'{"name":"__name__", "status_before":"__status_before__", "status_after":"__status_after__", "check_url":"__check_url__", "url":"__url__"}'`

`CIAO_WEBHOOK_PAYLOAD_$NAME` ENV variable has to be a valid JSON one-liner wrapped in single quotes like `'{"name":"__name__", "status_before":"__status_before__", "status_after":"__status_after__", "check_url":"__check_url__", "url":"__url__"}'`.
## Notes

* If you are using `docker-compose`, you have to omit the outer `""` and `''` in `*_ENDPOINT_*` and `*_PAYLOAD_*` - take a look at these GitHub issues ([1](https://github.com/brotandgames/ciao/issues/40), [2](https://github.com/docker/compose/issues/2854)) and these Stack Overflow questions ([1](https://stackoverflow.com/questions/53082932/yaml-docker-compose-spaces-quotes), [2](https://stackoverflow.com/questions/41988809/docker-compose-how-to-escape-environment-variables))
* You can add an Example configuration for a Service that's missing in the list via PR

## Example configurations

Expand Down

0 comments on commit dd13b40

Please sign in to comment.