aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2021-09-09 17:02:16 +0100
committerGravatar Chris Lovering <[email protected]>2021-09-09 17:02:16 +0100
commit14468af29752b641825fe9cef4ec1d82aa04859e (patch)
tree807b016093d0ff0f4d9a828bf102743ec6909d70
parentMerge pull request #6 from python-discord/sync-channels-guard-no-category (diff)
Add a docker compose for local dev
-rw-r--r--docker-compose.yml43
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