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/
|
env/
|
||||||
pwsBot/commands/__pycache__/
|
pwsBot/commands/__pycache__/
|
||||||
pwsBot/resource/__pycache__/
|
pwsBot/resource/__pycache__/
|
||||||
token.json
|
pwsBot/resource/token.json
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
FROM python:3.11
|
FROM python:3.11
|
||||||
|
|
||||||
WORKDIR /discord
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./ /discord
|
COPY bot.py requirements.txt ./
|
||||||
|
COPY resource/ ./resource
|
||||||
|
COPY commands/ ./commands
|
||||||
|
|
||||||
EXPOSE 3000
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
WORKDIR /discord
|
|
||||||
|
|
||||||
CMD [ "python", "bot.py" ]
|
CMD [ "python", "bot.py" ]
|
||||||
|
@ -15,7 +15,7 @@ pws_command_with_args_regex = r'/pws \S+(.*)'
|
|||||||
|
|
||||||
intents = get_intents()
|
intents = get_intents()
|
||||||
client = discord.Client(intents=intents)
|
client = discord.Client(intents=intents)
|
||||||
client_token = get_token('../token.json')
|
client_token = get_token('resource/token.json')
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_ready():
|
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:
|
services:
|
||||||
website:
|
pwsBot:
|
||||||
image: pwsBot:latest
|
image: pwsbot:latest
|
||||||
container_name: pwsBot
|
container_name: pwsBot
|
||||||
build: .
|
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