diff options
author | 2021-09-09 17:02:16 +0100 | |
---|---|---|
committer | 2021-09-09 17:02:16 +0100 | |
commit | 14468af29752b641825fe9cef4ec1d82aa04859e (patch) | |
tree | 807b016093d0ff0f4d9a828bf102743ec6909d70 /docker-compose.yml | |
parent | Merge pull request #6 from python-discord/sync-channels-guard-no-category (diff) |
Add a docker compose for local dev
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9128f58 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,43 @@ +version: "3.8" + +x-logging: &logging + logging: + driver: "json-file" + options: + max-file: "5" + max-size: "10m" + +x-restart-policy: &restart_policy + restart: "no" + +services: + postgres: + << : *logging + << : *restart_policy + 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 + + metricity: + << : *logging + << : *restart_policy + depends_on: + postgres: + condition: service_healthy + build: + context: . + dockerfile: Dockerfile + volumes: + - ./logs:/metricity/logs + - .:/metricity:ro + env_file: + - .env + environment: + DATABASE_URI: postgres://pysite:pysite@postgres |