forked from PhantomBot/PhantomBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
143 lines (140 loc) · 8.29 KB
/
docker-compose.yml
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# Copyright (C) 2016-2024 phantombot.github.io/PhantomBot
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# To bring up or update the container
# docker compose up --pull always -d
#
# To bring up the container, and also bring up ouroboros for auto-updates
# docker compose up --pull always --profile ouroboros -d
services:
# Service name, used internally by Docker Compose. Can be changed but does not matter
phantombot:
# Container name, this will show up in Docker command output, Docker Desktop, Portainer, etc
# If running multiple bot instances, this should be changed so you will know which bot this instance belongs to
container_name: phantombot
# Image to pull, automatically selects the latest version when creating the container
image: ghcr.io/phantombot/phantombot
#
# Maps the panel port so it is accessible to the host and, if firewall settings allow, the internet
ports:
# The port the bot webserver listens on in the container
# This should not be changed, and the baseport setting in botlogin.txt should not be changed
# It is not necessary with Docker since this is internal to each individual container instance
- target: 25000
#
# The port the bot webserver will be published to on the host
# This is the number that should be changed, if not using Traefik, when hosting multiple bot instances on the same server
# If using Traefik, this should not be changed
published: 25000
#
# TCP protocol for HTTP. Do not change
protocol: tcp
# The restart policy. "always" or "unless-stopped" are the recommended values and are required to use the panel restart button
# "unless-stopped": The container auto-restarts. If you stop the container using a Docker command, it will stay stopped until you start it using a Docker command
# "always": The container always auto-restarts. If you stop the container using a Docker command, it will auto-restart if the Docker service or server restarts
restart: unless-stopped
volumes:
# Defines the volume mount for data persistence inside the container, do not change
# See the bottom of this file for the part you can change
- PhantomBot_data:/opt/PhantomBot_data
#
# ------ Set any botlogin.txt variable here, with the PHANTOMBOT_ prefix
# ------ Note that after first run, botlogin.txt takes priority
# ------ None of the variables are required
# ------ Uncomment the following line, then add your variables below it
# ------ Remember to indent 2 spaces
#environment:
# If you uncomment this variable, your ENV variables will always override botlogin.txt
# PHANTOMBOT_ENVOVERRIDE: true
# Service name, used internally by Docker Compose. Can be changed but does not matter
# The ouroboros service provides auto-update functionality
# To enable this service, the profile must be activated when using the "docker compose up" command
# docker compose up --pull always --profile ouroboros -d
#
# NOTE: This container only needs to be created ONCE and it will then apply to all containers, unless the configuration is changed to do otherwise
ouroboros:
# Container name, this will show up in Docker command output, Docker Desktop, Portainer, etc
container_name: ouroboros
# Explicitly sets the NETBIOS name of the container
hostname: ouroboros
# Image to pull, automatically selects the latest version when creating the container
image: ghcr.io/gmt2001/ouroboros
# Assigns this container to a profile, requiring the "--profile ouroboros" addition to the "docker compose up" command to activate
profiles: ["ouroboros"]
# Defines the configuration for ouroboros, see https://github.com/gmt2001/ouroboros/wiki/Usage
environment:
# If `true`, after an update the old image is removed from disk if it is not being used by any remaining containers
- CLEANUP=true
# Interval, in seconds, to check for updates
- INTERVAL=300
# To instead only have updates run on a schedule (during certain hours, etc), remove the hash symbol (#) below
# and set to a valid crontab expression. The interval above is ignored if CRON is enabled
#
# The default schedule defined below is "At 0400 every day", in the timezone defined in TZ below
#
# For help creating a crontab expression, see https://crontab.guru/#0_4_*_*_*
# NOTE: Do NOT use the non-standard @expressions defined on this website
#- CRON="0 4 * * *"
# Sets the output language. For available languages besides `en`, see https://github.com/gmt2001/ouroboros/tree/main/locales
- LANGUAGE=en
# Verbosity of logging output
- LOG_LEVEL=info
# Change to `true` if you want ouroboros to only notify you of new updates, but not install them
# --- NOTE: A Docker update necessarily involves an automatic deletion and re-creation of the container
# --- This will reset variables on the bot. Some systems, such as raffleSystem, will save their state, but others may not
# --- You should consider this information when making a decision on this setting
# If this is `true`, you will need to re-run `docker compose up --pull always --profile ouroboros -d`
# each time you want to install an update to PhantomBot
- MONITOR_ONLY=false
# Defines where to send notifications to. See https://github.com/caronc/apprise#supported-notifications
# To send notifications to multiple locations, separate each URI with a space as in the example below
#
# Remove the hash symbol (#) below and change to valid URIs to enable
#- NOTIFIERS="discord://webhook_id/webhook_token mailtos://userid:[email protected]"
# If `true`, ouroboros is allowed to update itself
- SELF_UPDATE=true
# Sets the timezone used for logging and the scheduler
# For a list of valid timezones, see the `TZ identifier` column at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=America/New_York
# The restart policy. "always" or "unless-stopped" are the recommended values and are required to use the panel restart button
# "unless-stopped": The container auto-restarts. If you stop the container using a Docker command, it will stay stopped until you start it using a Docker command
# "always": The container always auto-restarts. If you stop the container using a Docker command, it will auto-restart if the Docker service or server restarts
restart: unless-stopped
volumes:
# Provides a connection to Docker engine to manage containers. DO NOT CHANGE
- /var/run/docker.sock:/var/run/docker.sock
# Defines the volume mount for ouroboros script hooks
# Change the part on the left side of the colon (:) to a path on the host
# Do not change the right side of the colon (:)
#
# For information on script hooks, see https://github.com/gmt2001/ouroboros/wiki/Hooks
- /app/pyouroboros/hooks:/app/pyouroboros/hooks
volumes:
# It is recommended to leave this as it is with the lines commented out
# This allows Docker to handle your data volume and associated permissions
# with a guarantee that they will work properly
#
# If you still want mount to a host directory, this is where you do it
# Remove the # symbols from all 5 lines below, then change the path on the last line
# NOTE: It is important that you do not add or remove any spaces
# NOTE: For Windows on WSL2, paths should be specified using forward slashes `/`
# NOTE: For Windows on WSL2, the drive letter should be specified as `//c/` instead of `c:/`
PhantomBot_data:
# driver: local
# driver_opts:
# type: none
# o: bind
# device: /home/someuser/phantombot