add docker-compose.yml
This commit is contained in:
parent
505e5f1ad5
commit
dcc7dda040
|
@ -11,3 +11,6 @@ pylama.ini
|
||||||
|
|
||||||
# Bot documentation
|
# Bot documentation
|
||||||
README.md
|
README.md
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,3 +7,6 @@
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
/*.db
|
/*.db
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env
|
|
@ -8,11 +8,6 @@ RUN pip install -r requirements.txt
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
# App settings
|
|
||||||
ENV RSSBOT_DSN=xxx
|
|
||||||
ENV RSSBOT_TG_TOKEN=xxx
|
|
||||||
ENV LOG_LEVEL=INFO
|
|
||||||
|
|
||||||
ENTRYPOINT [ "python" ]
|
ENTRYPOINT [ "python" ]
|
||||||
|
|
||||||
CMD [ "bot.py" ]
|
CMD [ "bot.py" ]
|
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
rss-bot:
|
||||||
|
build: .
|
||||||
|
image: rss_bot
|
||||||
|
# App settings
|
||||||
|
# DSN schema: postgres://username:password@hostname/database_name
|
||||||
|
environment:
|
||||||
|
- RSSBOT_DSN=xxx
|
||||||
|
- RSSBOT_TG_TOKEN=xxx
|
||||||
|
- LOG_LEVEL=INFO
|
||||||
|
container_name: rss_bot
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:14-alpine
|
||||||
|
# Postgres settings.
|
||||||
|
# Can use POSTGRES_DB variable. https://hub.docker.com/_/postgres
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=xxx
|
||||||
|
volumes:
|
||||||
|
- postgres_bot_db:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_bot_db:
|
Loading…
Reference in a new issue