From 69e905e1e2818966dd2d194df1ee76df69d94b8f Mon Sep 17 00:00:00 2001 From: "Michael D. M. Dryden" Date: Mon, 13 Nov 2023 22:21:46 -0500 Subject: [PATCH] Update docker and docker-compose --- CHANGELOG.rst | 2 ++ Dockerfile | 6 +++--- docker-compose.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0632699..7a90a62 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,8 @@ Changed - Separate SQL code from db_init function - Update to psycopg 3.0 - Add more protection against bad stats options +- Upgrade docker image to python 3.11 +- Update docker-compose file to use postgres 16 Fixed ----- diff --git a/Dockerfile b/Dockerfile index dd9dd0d..5ddcfb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM python:3.9 +FROM python:3.11 WORKDIR /usr/src/app COPY . . RUN pip install . -ENV TZ="America/Toronto" \ +ENV TZ="America/New_York" \ BOT_TOKEN=-1 \ CHAT_ID=0 \ POSTGRES_USER=postgres \ @@ -13,4 +13,4 @@ ENV TZ="America/Toronto" \ POSTGRES_HOST=db \ POSTGRES_DB=telegram_bot -CMD [ "sh", "-c", "python -m telegram_stats_bot.main --tz=$TZ $BOT_TOKEN $CHAT_ID postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB" ] +CMD [ "sh", "-c", "python -m telegram_stats_bot.main --tz=$TZ $BOT_TOKEN $CHAT_ID postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB" ] diff --git a/docker-compose.yml b/docker-compose.yml index 621d44f..ffc67e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: POSTGRES_HOST: db POSTGRES_DB: telegram_bot db: - image: postgres:12 + image: postgres:16 restart: always volumes: - db-data:/var/lib/postgresql/data