aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
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 8afdd6ef1..0f0355dac 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,20 +4,36 @@
version: "3.7"
+x-logging: &logging
+ logging:
+ driver: "json-file"
+ options:
+ max-file: "5"
+ max-size: "10m"
+
+x-restart-policy: &restart_policy
+ restart: unless-stopped
+
services:
postgres:
- image: postgres:12-alpine
+ << : *logging
+ << : *restart_policy
+ image: postgres:13-alpine
environment:
POSTGRES_DB: pysite
POSTGRES_PASSWORD: pysite
POSTGRES_USER: pysite
redis:
+ << : *logging
+ << : *restart_policy
image: redis:5.0.9
ports:
- "127.0.0.1:6379:6379"
snekbox:
+ << : *logging
+ << : *restart_policy
image: ghcr.io/python-discord/snekbox:latest
init: true
ipc: none
@@ -26,6 +42,8 @@ services:
privileged: true
web:
+ << : *logging
+ << : *restart_policy
image: ghcr.io/python-discord/site:latest
command: ["run", "--debug"]
networks:
@@ -46,6 +64,8 @@ services:
STATIC_ROOT: /var/www/static
bot:
+ << : *logging
+ << : *restart_policy
build:
context: .
dockerfile: Dockerfile