services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    ports:
      - 4743:80
    environment:
      - TZ=America/Los_Angeles
      - SIGNUPS_ALLOWED=true
      - INVITATIONS_ALLOWED=true
      - WEBSOCKET_ENABLED=false
      - ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN}
    volumes:
      - /mnt/user/appdata/vaultwarden:/data

  freshrss:
    image: lscr.io/linuxserver/freshrss:latest
    container_name: freshrss
    restart: unless-stopped
    environment:
      - PUID=99
      - PGID=100
      - UMASK=022
      - TZ=America/Los_Angeles
      - CRON_MIN=*/30
    ports:
      - 8054:80
    volumes:
      - /mnt/user/appdata/freshrss:/config

  linkwarden:
    image: ghcr.io/linkwarden/linkwarden:latest
    container_name: linkwarden
    restart: unless-stopped
    ports:
      - 3030:3000
    environment:
      - DATABASE_URL=postgresql://linkwarden:${LINKWARDEN_DB_PASSWORD}@linkwarden-db:5432/linkwarden
      - NEXTAUTH_SECRET=${LINKWARDEN_NEXTAUTH_SECRET}
      - NEXTAUTH_URL=${LINKWARDEN_URL:-http://localhost:3000}
    volumes:
      - /mnt/user/appdata/linkwarden/data:/data/data
    depends_on:
      - linkwarden-db

  prosody:
    image: prosodyim/prosody:13.0 
    container_name: prosody
    entrypoint: /prosody-init.sh
    ports:
      - "5222:5222"
      - "5269:5269"
      - "5280:5280"
      - "5281:5281"
    volumes:
      - /mnt/user/flook-stacks/stacks/productivity/prosody-init.sh:/prosody-init.sh
      - /mnt/user/flook-stacks/stacks/productivity/config/prosody.cfg.lua:/etc/prosody/prosody.cfg.lua
      - /mnt/user/flook-stacks/stacks/productivity/config/rishighan.cfg.lua:/etc/prosody/conf.d/rishighan.cfg.lua
      - /mnt/user/flook-stacks/stacks/productivity/data:/var/lib/prosody
      - /mnt/user/flook-stacks/stacks/productivity/certs:/etc/prosody/certs:ro
    restart: unless-stopped 

  linkwarden-db:
    image: postgres:16-alpine
    container_name: linkwarden-db
    restart: unless-stopped
    environment:
      - POSTGRES_USER=linkwarden
      - POSTGRES_PASSWORD=${LINKWARDEN_DB_PASSWORD}
      - POSTGRES_DB=linkwarden
    volumes:
      - /mnt/user/appdata/linkwarden/pgdata:/var/lib/postgresql/data
