-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (94 loc) · 3.42 KB
/
docker-compose.yml
File metadata and controls
114 lines (94 loc) · 3.42 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Bot Shock Docker Setup
# This file lets you run Bot Shock using Docker Compose.
# Copy this file and fill in your credentials before running.
services:
botshock:
build:
context: .
dockerfile: Dockerfile
args:
# Version information (automatically read from botshock/__init__.py if not set)
- VERSION=${BOTSHOCK_VERSION:-1.0.0}
- BUILD_DATE=${BUILD_DATE:-}
- VCS_REF=${VCS_REF:-}
image: ghcr.io/tastelessvoid/bot-shock:${BOTSHOCK_VERSION:-latest}
container_name: botshock
restart: unless-stopped
# Expose dashboard port (uncomment if dashboard is enabled)
# ports:
# - "8080:8080"
environment:
# Required: Your Discord bot token
# Get this from the Discord Developer Portal
- DISCORD_TOKEN=your_discord_bot_token_here
# Required: Encryption key for storing API tokens securely
# Generate one by running: botshock-keygen
- ENCRYPTION_KEY=your_encryption_key_here
# Database settings (defaults work fine for most setups)
# - DATABASE_PATH=/app/data/botshock.db
# - DATABASE_POOL_SIZE=5
# API settings (usually no need to change these)
# - API_BASE_URL=https://api.openshock.app
# - API_TIMEOUT=10
# - API_MAX_CONNECTIONS=100
# - API_REQUESTS_PER_MINUTE=60
# Logging settings
# Options: DEBUG, INFO, WARNING, ERROR
# - LOG_LEVEL=INFO
# - LOG_DIR=/app/logs
# How long to keep old log files
# - LOG_RETENTION_DAYS=30
# - LOG_MAX_OLD_FILES=10
# ===== Dashboard Settings (Optional) =====
# Uncomment these to enable the web dashboard
# - DASHBOARD_ENABLED=true
# - DASHBOARD_HOST=0.0.0.0
# - DASHBOARD_PORT=8080
# - DASHBOARD_SECRET_KEY=your_secret_key_here
# Discord OAuth2 (required for dashboard login)
# Get these from Discord Developer Portal > OAuth2
# - DISCORD_CLIENT_ID=your_client_id
# - DISCORD_CLIENT_SECRET=your_client_secret
# - DASHBOARD_REDIRECT_URI=http://localhost:8080/callback
volumes:
# Database storage (keeps your data when the container restarts)
# Option 1: Named volume (default, works on most systems)
- botshock_data:/app/data
# Option 2: Bind mount (better for TrueNAS/NAS systems)
# Uncomment the line below and comment out the named volume above
# - ./data:/app/data
# Log storage
# Option 1: Named volume (default)
- botshock_logs:/app/logs
# Option 2: Bind mount
# - ./logs:/app/logs
# For TrueNAS: You may need to set the user ID to match your host
# Uncomment and adjust the UID/GID to match your TrueNAS dataset owner
# user: "1000:1000"
networks:
- botshock_network
# Resource limits to prevent runaway memory usage
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
volumes:
botshock_data:
name: botshock_data
botshock_logs:
name: botshock_logs
networks:
botshock_network:
name: botshock_network
driver: bridge
# Quick start:
#
# 1. Copy this file to docker-compose.yml
# 2. Replace the DISCORD_TOKEN and ENCRYPTION_KEY values
# 3. Run: docker-compose up -d
# 4. Check logs: docker-compose logs -f
#
# To generate an encryption key without installing Python locally:
# docker run --rm python:3.12-slim python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"