Docker и docker-compose

This commit is contained in:
Vladless
2024-10-26 02:12:34 +03:00
parent 37561c086f
commit 5a04b360db
13 changed files with 28 additions and 1 deletions
+1
View File
@@ -8,3 +8,4 @@
/database.db
/backup_pg.sh
/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.