mirror of
https://github.com/runyanjake/discord.git
synced 2025-10-04 15:27:28 -07:00
Dockerize PWSBot
This commit is contained in:
parent
23d990fd99
commit
4ce5873711
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
env/
|
||||
pwsBot/commands/__pycache__/
|
||||
pwsBot/resource/__pycache__/
|
||||
token.json
|
||||
pwsBot/resource/token.json
|
||||
|
@ -1,11 +1,11 @@
|
||||
FROM python:3.11
|
||||
|
||||
WORKDIR /discord
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ /discord
|
||||
COPY bot.py requirements.txt ./
|
||||
COPY resource/ ./resource
|
||||
COPY commands/ ./commands
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
WORKDIR /discord
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
CMD [ "python", "bot.py" ]
|
||||
|
@ -15,7 +15,7 @@ pws_command_with_args_regex = r'/pws \S+(.*)'
|
||||
|
||||
intents = get_intents()
|
||||
client = discord.Client(intents=intents)
|
||||
client_token = get_token('../token.json')
|
||||
client_token = get_token('resource/token.json')
|
||||
|
||||
@client.event
|
||||
async def on_ready():
|
||||
|
0
pwsBot/commands/__init__.py
Normal file
0
pwsBot/commands/__init__.py
Normal file
@ -1,10 +1,8 @@
|
||||
version: "3"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
website:
|
||||
image: pwsBot:latest
|
||||
pwsBot:
|
||||
image: pwsbot:latest
|
||||
container_name: pwsBot
|
||||
build: .
|
||||
ports:
|
||||
- 8000:8000
|
||||
|
||||
|
1
pwsBot/requirements.txt
Normal file
1
pwsBot/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
discord.py==2.3.2
|
Loading…
x
Reference in New Issue
Block a user