aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-11-09 01:38:52 +0100
committerGravatar Numerlor <[email protected]>2021-11-09 01:38:52 +0100
commit74523cd6505699c79316ce15f725331b6f0a5e71 (patch)
treea8079a9a560469964c3d7e79fbd0978f0f5b2cb5 /docker-compose.yml
parentRemove try_get_tag ctx args test (diff)
parentMerge pull request #1872 from python-discord/experiments/isort (diff)
Merge remote-tracking branch 'upstream/main' into tag-groups
# Conflicts: # bot/converters.py # bot/exts/info/tags.py # tests/bot/test_converters.py
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml22
1 files changed, 21 insertions, 1 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index 0f0355dac..b3ca6baa4 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -23,6 +23,11 @@ services:
POSTGRES_DB: pysite
POSTGRES_PASSWORD: pysite
POSTGRES_USER: pysite
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U pysite"]
+ interval: 2s
+ timeout: 1s
+ retries: 5
redis:
<< : *logging
@@ -31,6 +36,21 @@ services:
ports:
- "127.0.0.1:6379:6379"
+ metricity:
+ << : *logging
+ restart: on-failure # USE_METRICITY=false will stop the container, so this ensures it only restarts on error
+ depends_on:
+ postgres:
+ condition: service_healthy
+ image: ghcr.io/python-discord/metricity:latest
+ env_file:
+ - .env
+ environment:
+ DATABASE_URI: postgres://pysite:pysite@postgres/metricity
+ USE_METRICITY: ${USE_METRICITY-false}
+ volumes:
+ - .:/tmp/bot:ro
+
snekbox:
<< : *logging
<< : *restart_policy
@@ -56,7 +76,7 @@ services:
- "127.0.0.1:8000:8000"
tty: true
depends_on:
- - postgres
+ - metricity
environment:
DATABASE_URL: postgres://pysite:pysite@postgres:5432/pysite
METRICITY_DB_URL: postgres://pysite:pysite@postgres:5432/metricity