forked from FuzzyGrim/Yamtrack
-
-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathdocker-compose.postgres.yml
More file actions
64 lines (61 loc) · 2.31 KB
/
Copy pathdocker-compose.postgres.yml
File metadata and controls
64 lines (61 loc) · 2.31 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
53
54
55
56
57
58
59
60
61
62
63
64
services:
floppy:
container_name: floppy
# Image defaults to :latest tag (latest commit on the latest branch)
# You can also explicitly use :latest, :release, or a version tag
image: ghcr.io/dannyvfilms/floppy
restart: unless-stopped
depends_on:
- db
- redis
environment:
- TZ=Europe/Berlin
- SECRET=longstring
- REDIS_URL=redis://redis:6379
- DB_HOST=db
# These stay "yamtrack" on purpose: renaming the database, role, or
# password against an existing postgres_data volume breaks the stack.
# New installs can use any values as long as both services agree.
- DB_NAME=yamtrack
- DB_USER=yamtrack
- DB_PASSWORD=yamtrack
- DB_PORT=5432
- ADMIN_ENABLED=False
# Off by default: otherwise a publicly known demo/demodemo
# account is provisioned after migrations.
- DEMO_ACCOUNT_ENABLED=False
# Keep DEBUG off in production: the debug toolbar slows every request
# and disables Django's cached template loader.
- DEBUG=False
# Web concurrency is sized from the host automatically. Set
# WEB_CONCURRENCY/GUNICORN_THREADS only when you intentionally want to
# override the detected resource tier.
ports:
- "8000:8000"
db:
image: postgres:16-alpine
container_name: floppy-db
environment:
- POSTGRES_DB=yamtrack
- POSTGRES_USER=yamtrack
- POSTGRES_PASSWORD=yamtrack
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
container_name: floppy-redis
image: redis:8-alpine
restart: unless-stopped
# Persist to disk so a restart doesn't drop the cache wholesale (#386), but
# with a memory ceiling: Redis defaults to unlimited growth plus
# noeviction, which on a small host ends as an OOM rather than an eviction
# (#521). volatile-lru only evicts keys with a TTL, so Floppy's cache is
# reclaimable while the Celery queues (which have none) are not. `--save ""`
# drops RDB snapshots, since the AOF already covers persistence.
# Floppy applies equivalent limits at runtime if this is left off.
command: redis-server --appendonly yes --save "" --maxmemory 256mb --maxmemory-policy volatile-lru
volumes:
- redis_data:/data
volumes:
redis_data:
postgres_data: