task-board/portainer-stack.yml
2025-06-24 14:26:42 +04:00

116 lines
3.0 KiB
YAML

version: '3.8'
# Taskboard - Portainer Production Stack
# Complete configuration for deployment via Portainer
# Values are hardcoded for easy deployment
networks:
taskboard-network:
driver: bridge
name: taskboard-network
nginx-proxy-manager_default:
external: true
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: taskboard-postgres
restart: unless-stopped
networks:
- taskboard-network
environment:
POSTGRES_DB: taskboard
POSTGRES_USER: taskboard_user
POSTGRES_PASSWORD: BlackMoonSky89
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=C --lc-ctype=C"
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskboard_user -d taskboard"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
# Next.js Application
app:
image: rightshiftlord/taskboard:latest
container_name: taskboard-app
restart: unless-stopped
networks:
- taskboard-network
- nginx-proxy-manager_default
environment:
# Database Configuration
DATABASE_URL: "postgresql://taskboard_user:BlackMoonSky89@postgres:5432/taskboard"
# NextAuth Configuration
NEXTAUTH_URL: "https://taskboard.lci.ge"
NEXT_PUBLIC_APP_URL: "https://taskboard.lci.ge"
AUTH_SECRET: "w2SttmJGLqP4Is+zHB2RMt/2A52sxlm5t9cwZQjZhRw="
AUTH_TRUST_HOST: "true"
# Node Environment
NODE_ENV: "production"
NEXT_TELEMETRY_DISABLED: "1"
# Authentik Configuration
AUTHENTIK_ID: "07ncZfyhcfxURFxYQBfgtqJCmziTLcWPohLaSr5n"
AUTHENTIK_SECRET: "l1mTTYR26Zh5tnnOv2rmiM8Lj3LwnLqGUOaFE5ihMuaP6RfTaIGY288UTaDDpawmenU25i1JQk4lhoLBMUzNJ9FxM7R0idN3qyXvHWFMzhbRGfcpKsxlW7xu28xa8mqf"
# nginx-proxy-manager variables (these will be auto-detected)
VIRTUAL_HOST: "taskboard.lci.ge"
VIRTUAL_PORT: 3000
LETSENCRYPT_HOST: "taskboard.lci.ge"
LETSENCRYPT_EMAIL: "admin@lci.ge"
depends_on:
postgres:
condition: service_healthy
volumes:
- app_uploads:/app/uploads
- app_logs:/app/logs
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
deploy:
resources:
limits:
memory: 1G
cpus: '1.0'
reservations:
memory: 512M
cpus: '0.5'
volumes:
postgres_data:
driver: local
app_uploads:
driver: local
app_logs:
driver: local