mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 00:06:28 +00:00
add healthcheck examples
This commit is contained in:
parent
97741ed73f
commit
22d4efb03e
14
README.md
14
README.md
@ -78,7 +78,9 @@ of the notes even if it tried to.
|
|||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
ℹ️ `https` is required otherwise browsers will not support the cryptographic functions.
|
> ℹ️ `https` is required otherwise browsers will not support the cryptographic functions.
|
||||||
|
|
||||||
|
> ℹ️ There is a health endpoint available at `/api/health/`. It returns either 200 or 503.
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
@ -94,7 +96,7 @@ services:
|
|||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
# Set a size limit. See link below on how to customise.
|
# Set a size limit. See link below on how to customise.
|
||||||
# https://redis.io/docs/manual/eviction/
|
# https://redis.io/docs/manual/eviction/
|
||||||
command: redis-server --maxmemory 1gb --maxmemory-policy allkeys-lru
|
# command: redis-server --maxmemory 1gb --maxmemory-policy allkeys-lru
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: cupcakearmy/cryptgeon:latest
|
image: cupcakearmy/cryptgeon:latest
|
||||||
@ -105,6 +107,14 @@ services:
|
|||||||
SIZE_LIMIT: 4 MiB
|
SIZE_LIMIT: 4 MiB
|
||||||
ports:
|
ports:
|
||||||
- 80:8000
|
- 80:8000
|
||||||
|
|
||||||
|
# Optional health checks
|
||||||
|
# healthcheck:
|
||||||
|
# test: ["CMD", "curl", "--fail", "http://127.0.0.1:8000/api/live/"]
|
||||||
|
# interval: 1m
|
||||||
|
# timeout: 3s
|
||||||
|
# retries: 2
|
||||||
|
# start_period: 5s
|
||||||
```
|
```
|
||||||
|
|
||||||
### NGINX Proxy
|
### NGINX Proxy
|
||||||
|
@ -16,3 +16,10 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
ports:
|
ports:
|
||||||
- 1234:8000
|
- 1234:8000
|
||||||
|
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:8000/api/live/"]
|
||||||
|
interval: 1m
|
||||||
|
timeout: 3s
|
||||||
|
retries: 2
|
||||||
|
start_period: 5s
|
||||||
|
@ -16,3 +16,11 @@ services:
|
|||||||
SIZE_LIMIT: 4 MiB
|
SIZE_LIMIT: 4 MiB
|
||||||
ports:
|
ports:
|
||||||
- 80:8000
|
- 80:8000
|
||||||
|
|
||||||
|
# Optional health checks
|
||||||
|
# healthcheck:
|
||||||
|
# test: ["CMD", "curl", "--fail", "http://127.0.0.1:8000/api/live/"]
|
||||||
|
# interval: 1m
|
||||||
|
# timeout: 3s
|
||||||
|
# retries: 2
|
||||||
|
# start_period: 5s
|
||||||
|
Loading…
Reference in New Issue
Block a user