diff options
author | 2022-01-13 17:35:05 -0500 | |
---|---|---|
committer | 2022-01-13 17:35:05 -0500 | |
commit | 66f139155e40093c55edd734b116bae865c7ed0c (patch) | |
tree | 4ab8969e7b384c80ef2f2d2c2e4c59ca455bc33b /docker-compose.yml | |
parent | chore: Update tests to correspond with the timeit command (diff) | |
parent | empty commit for CI (diff) |
chore: Fix merge conflicts
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index bdfedf5c2..869d9acb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,17 +12,22 @@ x-logging: &logging max-size: "10m" x-restart-policy: &restart_policy - restart: always + restart: unless-stopped services: postgres: << : *logging << : *restart_policy - image: postgres:12-alpine + image: postgres:13-alpine environment: 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 @@ -70,7 +90,6 @@ services: context: . dockerfile: Dockerfile volumes: - - ./logs:/bot/logs - .:/bot:ro tty: true depends_on: |