All templates

Yarnl

v1.0.0

Your self-hosted crochet and knitting companion. Organize your patterns, track your projects, and share your creations with the world.

hobby by xPand4B
x-arcane:
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/selfh-st.svg
  urls:
    - https://yarnl.com

services:
  postgres:
    container_name: yarnl-db
    image: postgres:16-alpine
    volumes:
      - yarnl-postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: ${POSTGRES_DB:-yarnl}
      POSTGRES_USER: ${POSTGRES_USER:-yarnl}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-yarnl}
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-yarnl}"]
      interval: 5s
      timeout: 5s
      retries: 5
    labels:
      com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/postgresql.svg
      #com.getarcaneapp.arcane.updater: false

  yarnl:
    container_name: yarnl
    image: titandrive/yarnl:latest
    ports:
      - ${APP_PORT:-3000}:3000
    volumes:
      - ./users:/app/users
      # Optional: mount an external path for backups
      # - /mnt/user/drive:/backups
    environment:
      POSTGRES_HOST: postgres
      POSTGRES_PORT: 5432
      POSTGRES_DB: ${POSTGRES_DB:-yarnl}
      POSTGRES_USER: ${POSTGRES_USER:-yarnl}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-yarnl}
      ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
      TZ: ${TZ:-UTC}
      SECURE_COOKIES: ${SECURE_COOKIES:-false}
      FORCE_LOCAL_LOGIN: ${FORCE_LOCAL_LOGIN:-false}
    restart: unless-stopped
    depends_on:
      postgres:
        condition: service_healthy
    labels:
      com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/selfh-st.svg
      #com.getarcaneapp.arcane.updater: false
      com.getarcaneapp.arcane.depends-on: postgres

volumes:
  yarnl-postgres-data: