healthchecks
This commit is contained in:
+3
-1
@@ -10,7 +10,9 @@ RUN go build -o backend
|
|||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk --no-cache add ca-certificates
|
RUN apk --no-cache add ca-certificates curl
|
||||||
|
|
||||||
COPY --from=builder /app/backend /backend
|
COPY --from=builder /app/backend /backend
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=15s --timeout=3s CMD curl -f http://localhost:8080/v1/ || exit 1
|
||||||
CMD ["/backend"]
|
CMD ["/backend"]
|
||||||
|
|||||||
+9
-1
@@ -7,6 +7,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis-data:/data
|
- ./redis-data:/data
|
||||||
|
environment:
|
||||||
|
REDIS_ARGS: --save 300 1 60 10
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: vencord/backend
|
image: vencord/backend
|
||||||
@@ -15,4 +22,5 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user