Repository navigation
Expand file tree
/
Copy pathdocker-compose.instance.yml
More file actions
58 lines (54 loc) · 1.88 KB
/
Copy pathdocker-compose.instance.yml
File metadata and controls
58 lines (54 loc) · 1.88 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
# SpamProtectionBot only, connected to a remote Federation server
#
# Unlike docker-compose.yml, this does not host a Federation server, database, or cache: the bot
# connects to an existing Federation server over the internet (or your own network).
#
# Before starting:
# 1. cp configuration.sample.yml configuration.yml
# 2. Edit configuration.yml: set bot.name and bot.api_key, and under federation set
# endpoint to the remote server's base URL, e.g. "https://federation.example.com/".
# Prefer https for a server reached over the internet: the access token is sent with every
# request.
# 3. Optionally set federation.access_token to an operator token issued by that server's
# administrator. Without one the bot runs anonymously, and features the server reserves for
# authenticated clients (publishing entities, submitting reports) are skipped.
#
# Start it with:
# docker compose -f docker-compose.instance.yml up -d --build
services:
bot:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: ${BUILD_DATE:-}
REVISION: ${GIT_COMMIT:-}
VERSION: ${VERSION:-1.0.0}
container_name: spam-protection-bot
restart: unless-stopped
init: true
stop_grace_period: 45s
# Where the bot reads its configuration and keeps its database, inside the container. These are
# the image's defaults; change them together with the volume mounts below.
environment:
SPB_CONFIG: /app/configuration.yml
SPB_DATABASE: /data/database.db
volumes:
- ./configuration.yml:/app/configuration.yml:ro
- spb-data:/data
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
deploy:
resources:
limits:
cpus: "1"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
volumes:
spb-data:
driver: local