Added docker files

This commit is contained in:
Elnath 2021-06-14 01:33:14 +02:00
parent 6f359abeaf
commit 3b8fc9e76d
3 changed files with 38 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3.7
WORKDIR /app
# We use requirements_freezed in order to ensure reproductible builds
COPY requirements_freeze.txt ./requirements.txt
RUN pip install -r requirements.txt
COPY ./GameFiles/ ./GameFiles/
COPY SecretBot.py utils.py ./
VOLUME ["/app/token", "/app/games.json"]
ENTRYPOINT ["/app/SecretBot.py"]

17
docker-compose.yml Normal file
View File

@ -0,0 +1,17 @@
version: "3"
services:
SecretBot:
build:
dockerfile: Dockerfile
context: .
image: secretbot
restart: unless-stopped
volumes:
- ./token:/app/token:ro
- ./games.json:/app/games.json
# To enable debug logs, uncomment next line
#command: "-v"
networks:
- secretbot
networks:
secretbot:

11
requirements_freeze.txt Normal file
View File

@ -0,0 +1,11 @@
# Created on 14/06/2021
discord.py==1.7.2
## The following requirements were added by pip freeze:
aiohttp==3.7.4.post0
async-timeout==3.0.1
attrs==21.2.0
chardet==4.0.0
idna==3.2
multidict==5.1.0
typing-extensions==3.10.0.0
yarl==1.6.3