mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-03 00:53:12 +00:00
45 lines
No EOL
1 KiB
YAML
45 lines
No EOL
1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
bot_env:
|
|
image: python:3.12-slim
|
|
container_name: atl-discordbot-python-env
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- .:/tux
|
|
working_dir: /tux
|
|
command: sh -c "pip install poetry && poetry install && cd tux && poetry run python main.py"
|
|
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
|
|
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 |