Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [--unsafe] # Required due to custom constructors (e.g. !ENV)
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
Expand Down
43 changes: 18 additions & 25 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
# the bot project relies on for testing. Use it if you haven't got a
# ready-to-use site environment already setup.

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
x-logging: &default-logging
driver: "json-file"
options:
max-file: "5"
max-size: "10m"

services:
postgres:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
image: postgres:15-alpine
environment:
POSTGRES_DB: pysite
Expand All @@ -30,15 +24,14 @@ services:
retries: 5

redis:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
image: redis:5.0.9
ports:
- "127.0.0.1:6379:6379"

metricity:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: on-failure # USE_METRICITY=false will stop the container, so this ensures it only restarts on error
depends_on:
postgres:
Expand All @@ -53,8 +46,8 @@ services:
- .:/tmp/bot:ro

snekbox:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
image: ghcr.io/python-discord/snekbox:latest
init: true
ipc: none
Expand All @@ -65,8 +58,8 @@ services:
- "3.10"

snekbox-311:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
image: ghcr.io/python-discord/snekbox:3.11-dev
init: true
ipc: none
Expand All @@ -75,8 +68,8 @@ services:
privileged: true

web:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
image: ghcr.io/python-discord/site:latest
command: ["run", "--debug"]
networks:
Expand All @@ -97,8 +90,8 @@ services:
STATIC_ROOT: /var/www/static

bot:
<< : *logging
<< : *restart_policy
logging : *default-logging
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
Expand Down