1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-03 00:53:12 +00:00
tux/docker-compose.yml

45 lines
1 KiB
YAML
Raw Normal View History

2023-12-13 00:53:26 +00:00
version: '3.8'
services:
bot_env:
image: python:3.11-slim
container_name: atl-discordbot-python-env
env_file:
- .env
2023-12-13 00:53:26 +00:00
volumes:
- .:/tux
working_dir: /tux
command: sh -c "pip install poetry && poetry install && cd tux && poetry run python main.py"
2023-12-13 00:53:26 +00:00
depends_on:
- postgres
networks:
- bot-network
restart: unless-stopped
labels:
- "atl.role=discordbot"
postgres:
image: postgres:latest
container_name: atl-discordbot-postgres-env
env_file:
- .env
2023-12-13 00:53:26 +00:00
environment:
# - POSTGRES_HOST_AUTH_METHOD=trust # comment this out if you do not want to connect with a password
ports:
- "5432:5432"
volumes:
- /opt/atl-discord-bot-data/dir:/var/lib/postgresql/data
networks:
- bot-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
labels:
- "atl.role=discordbot_database"
networks:
bot-network:
driver: bridge