Skip to content

Commit

Permalink
add the docker files to containerized the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
gylfirst committed Jan 16, 2024
1 parent ff45e2b commit 5a0548d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github
.env
.env.example
.gitignore
LICENSE
README.md
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dockerfile for the python discord bot

FROM python:3.12-alpine # test with 3.11-alpine if gcc needed or not

RUN apk --no-cache add gcc musl-dev

WORKDIR /usr/src/chouettebot

COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

COPY . .

CMD ["python3","main.py"]
8 changes: 8 additions & 0 deletions docker-compose.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.8"

services:
bot:
image: chouettebot # Name of the image you built
container_name: "chouette-bot" # Name of the container you want to display
volumes:
- /path/to/env/.env:/usr/src/chouettebot/.env # Path to .env file

0 comments on commit 5a0548d

Please sign in to comment.