Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
.gitignore
__pycache__
*.pyc
*.pyo
*.pyd
*.log
.env
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.11-slim

WORKDIR /app

# install git (sometimes needed for dependencies)
RUN apt-get update && apt-get install -y git

Check notice on line 6 in Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

Dockerfile#L6

Delete the apt lists (/var/lib/apt/lists) after installing something. (DL3009)

# copy project files
COPY . .

# install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# run the bot
CMD ["sh", "-c", "alembic upgrade heads && python -m cloudbot"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,17 @@ This product uses data from <a href="http://wordnik.com">http://wordnik.com</a>
[latest source]: https://github.com/TotallyNotRobots/CloudBot/archive/main.zip
[latest release]: https://github.com/TotallyNotRobots/CloudBot/releases/latest
[TheTVDB.com]: https://thetvdb.com/

## Running with Docker

Build the image:

docker build -t cloudbot .

Run the bot:

docker run cloudbot

Or use docker compose:

docker compose up
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
cloudbot:
build: .
container_name: cloudbot
restart: unless-stopped
volumes:
- ./config.json:/app/config.json