-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.14 KB
/
docker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
shellmate:
build: .
ports:
- "22:22"
environment:
- SHELLMATE_SSH_PORT=22
- SHELLMATE_REDIS_URL=redis://redis:6379
- SHELLMATE_DATABASE_URL=postgresql://shellmate:shellmate@postgres:5432/shellmate
- STOCKFISH_PATH=/usr/games/stockfish
volumes:
- ssh_keys:/etc/shellmate
depends_on:
- redis
- postgres
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "22"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=shellmate
- POSTGRES_PASSWORD=shellmate
- POSTGRES_DB=shellmate
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U shellmate"]
interval: 10s
timeout: 5s
retries: 5
volumes:
redis_data:
postgres_data:
ssh_keys: