Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.69 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
# The setup of the tutorial: https://community-insights.readthedocs.io/en/latest/tutorial.html
# cp .env.example .env # then edit .env
# docker compose up -d
# The logs are rotated: at most 5 files of 10 MB per service.
x-logging: &logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
services:
community-insights:
image: ghcr.io/pycalendar/community-insights:stable # or :latest for the main branch
# build: . # to use the local code instead
ports:
- "5000:5000"
env_file: .env
volumes:
- ./data:/app/data # the SQLite database and the generated secret key
restart: unless-stopped
logging: *logging
# With PostgreSQL: remove the comments of the db service and of depends_on,
# and set DATABASE_URL=postgres://community:community@db/community in .env
# depends_on:
# - db
# Optional: the fetch worker in a container of its own. Set
# FETCH_WORKER=external-separate-container in .env (then the web container
# starts no worker) and remove the comments. By default the image runs the
# worker in the web container (external-http-container).
# worker:
# image: ghcr.io/pycalendar/community-insights:stable
# entrypoint: ["python", "manage.py", "fetch_worker"]
# env_file: .env
# volumes:
# - ./data:/app/data
# restart: unless-stopped
# logging: *logging
# Optional: PostgreSQL instead of SQLite, for many people.
# db:
# image: postgres:17
# environment:
# POSTGRES_USER: community
# POSTGRES_PASSWORD: community
# POSTGRES_DB: community
# volumes:
# - ./data/postgres:/var/lib/postgresql/data
# restart: unless-stopped
# logging: *logging