feature/docker - add first docker compose & docker image files #5

Merged
geekiot merged 2 commits from feature/docker into develop 2025-10-24 00:47:26 +05:00
3 changed files with 62 additions and 0 deletions

34
.dockerignore Normal file
View file

@ -0,0 +1,34 @@
# Git
.git
.gitignore
LICENSE
*.md
# Docker
docker/
.dockerignore
# Nix stuff
flake.*
# Virtual environment
.venv/
venv/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Translations
*.mo
*.pot
# Logs
logs/
# Jupyter Notebook
.ipynb_checkpoints
# Ruff formatter
.ruff_cache/

20
docker/Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM ghcr.io/astral-sh/uv:trixie-slim
# Settings for UV
ENV UV_COMPILE_BYTECODE=1
ENV UV_TOOL_BIN_DIR=/usr/local/bin
# Copy base project files
COPY . /urfu-daddy
# Set working dir
WORKDIR /urfu-daddy
# Run UV commands
RUN uv sync --locked --no-install-project --no-dev
# Add uv installed tools to path
ENV PATH="/urfu-daddy/.venv/bin:$PATH"
# Clear entrypoint
ENTRYPOINT []

View file

@ -0,0 +1,8 @@
services:
bot:
container_name: urfu-daddy-bot
build:
context: ..
dockerfile: ./docker/Dockerfile
command: sh -c "uv run --active --script ./scripts/pybabel.py compile && uv run ./src/main.py"
restart: always