Update docker and docker-compose

testing
Michael D. M. Dryden 2023-11-13 22:21:46 -05:00
rodzic 91c60ad871
commit 69e905e1e2
3 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -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
-----

Wyświetl plik

@ -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" ]

Wyświetl plik

@ -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