forked from slarkbot/slarkbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.9
WORKDIR /app
# Install PostgreSQL client library and development files
RUN apt-get update && apt-get install -y libpq-dev
# Copy requirements.txt file to the working directory
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application files
COPY . .
# Set the build arguments for environment variables
ARG OPEN_DOTA_API_BASE_URL
ARG LOG_LEVEL
ARG TELEGRAM_BOT_TOKEN
ARG POSTGRES_USER
ARG POSTGRES_PASSWORD
ARG POSTGRES_DB
ARG POSTGRES_HOST
ARG PUDGEBOT_VERSION
ARG POSTGRES_URL
# Set the environment variables
ENV OPEN_DOTA_API_BASE_URL=$OPEN_DOTA_API_BASE_URL
ENV LOG_LEVEL=$LOG_LEVEL
ENV TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN
ENV POSTGRES_USER=$POSTGRES_USER
ENV POSTGRES_PASSWORD=$POSTGRES_PASSWORD
ENV POSTGRES_DB=$POSTGRES_DB
ENV POSTGRES_HOST=$POSTGRES_HOST
ENV PUDGEBOT_VERSION=$PUDGEBOT_VERSION
ENV POSTGRES_URL=$POSTGRES_URL
# Set the entry point or command to run your application
CMD ["python", "main.py"]