aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-02-22 18:17:32 -0800
committerGravatar MarkKoz <[email protected]>2022-02-22 18:17:32 -0800
commit64ca00f0d306ab9d8bfd78b9af9e99d33283cb03 (patch)
treeaf7231269aca52153f7f19df8a2d9b96bb1fb6b5 /docker-compose.yml
parentClarify that a resent infraction DM is not a new infraction. (diff)
parentMerge pull request #2078 from python-discord/chris/fix/help-channel-errors (diff)
Merge main into feat/mod/1664/resend-infraction
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml24
1 files changed, 22 insertions, 2 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index 0f0355dac..ce78f65aa 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,22 @@ services:
ports:
- "127.0.0.1:6379:6379"
+ metricity:
+ << : *logging
+ << : *restart_policy
+ 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 +77,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
@@ -70,7 +91,6 @@ services:
context: .
dockerfile: Dockerfile
volumes:
- - ./logs:/bot/logs
- .:/bot:ro
tty: true
depends_on: