version: '3.8'

services:
  coolify:
    image: ghcr.io/coollabsio/coolify:${TAG:-latest}
    restart: always
    container_name: coolify
    ports:
      - target: 3000
        published: 3000
        protocol: tcp
        mode: host
    volumes:
      - 'coolify-local-backup:/app/backups'
      - 'coolify-db:/app/db'
      - 'coolify-logs:/app/logs'
      - 'coolify-ssl-certs:/app/ssl'
      - 'coolify-traefik-letsencrypt:/etc/traefik/acme'
      - 'coolify-letsencrypt:/etc/letsencrypt'
      - '/var/run/docker.sock:/var/run/docker.sock'
    env_file:
      - '.env'
    networks:
      - coolify-infra
  fluent-bit:
    image: ghcr.io/coollabsio/fluent-bit:1.0.0
    container_name: coolify-fluentbit
    volumes:
      - 'coolify-logs:/app/logs'
    networks:
      - coolify-infra
networks:
  coolify-infra:
    attachable: true
    name: coolify-infra

volumes:
  coolify-local-backup:
    name: coolify-local-backup
  coolify-logs:
    name: coolify-logs
  coolify-db:
    name: coolify-db
  coolify-pgdb:
    name: coolify-pgdb
  coolify-ssl-certs:
    name: coolify-ssl-certs
  coolify-letsencrypt:
    name: coolify-letsencrypt
  coolify-traefik-letsencrypt:
    name: coolify-traefik-letsencrypt
