Merge pull request #42 from Vladless/new1

Docker и docker-compose
This commit is contained in:
Vladislav Lisitsyn
2024-10-26 02:13:46 +03:00
committed by GitHub
13 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -7,4 +7,5 @@
/bot_old_2.py
/database.db
/backup_pg.sh
/config copy.py
/config copy.py
/docker-compose.yml
+26
View File
@@ -0,0 +1,26 @@
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt .
RUN apt-get update && \
apt-get install -y postgresql-client locales && \
pip install --upgrade pip && pip install -r requirements.txt && \
sed -i '/ru_RU.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen ru_RU.UTF-8
# Устанавливаем переменные окружения
ENV LANG=ru_RU.UTF-8
ENV LANGUAGE=ru_RU:ru
ENV LC_ALL=ru_RU.UTF-8
COPY . .
# Замена DATABASE_URL на значение из переменной окружения
RUN sed -i "s|DATABASE_URL = .*|DATABASE_URL = '${DATABASE_URL}'|" config.py
# dosker-compose в полной версии бота
CMD ["python", "main.py"]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.