File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ __pycache__
2+ * .pyc
3+ * .pyo
4+ * .pyd
5+ .env
6+ .env. *
7+ .vscode
8+ .idea
9+ .git
10+ .gitignore
11+ docker-compose.yml
12+ * .log
13+ * .sqlite3
14+ .DS_Store
Original file line number Diff line number Diff line change 1+ # Uses one of Playwright official images to handle all browser needed deps
2+ FROM mcr.microsoft.com/playwright/python:3.11
3+
4+ # Sets an environmental variable to prevent Python from generating .pyc files in the container
5+ ENV PYTHONDONTWRITEBYTECODE=1
6+
7+ # Sets an environmental variable to prevent Python from buffering outputs
8+ ENV PYTHONUNBUFFERED=1
9+
10+ # Install basic dependencies
11+ RUN apt-get update && apt-get install -y wget curl && rm -rf /var/lib/apt/lists/*
12+
13+ # Sets workdir
14+ WORKDIR /discord-bot
15+
16+ # Copy project requirement file and install them
17+ COPY requirements.txt ./
18+ RUN pip install --no-cache-dir -r requirements.txt
19+
20+ # Installs Playwright browsers
21+ RUN playwright install
22+
23+ # Copy other project files
24+ COPY . .
25+
26+ # Defines the command to run the bot when the conteiner starts
27+ CMD ["python" , "src/main.py" ]
Original file line number Diff line number Diff line change 1+ version : ' 3.9'
2+
3+ services :
4+ a-voz-da-sasel-discord-bot :
5+ build :
6+ context : ..
7+ dockerfile : docker/Dockerfile
8+ image : sa-sel-discord-bot:latest
9+ container_name : a-voz-da-sasel
10+ env_file :
11+ - ./a-voz-da-sasel.env
12+ volumes :
13+ - ./a-voz-da-sasel.credentials.json:/discord-bot/credentials.json:ro
14+ restart : unless_stopped
You can’t perform that action at this time.
0 commit comments