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