services:
  joplin:
    image: joplin/server:latest
    container_name: joplin-server
    restart: always
    environment:
      APP_PORT: 8030
      APP_BASE_URL: https://server.joplin.adamoutler.com
      DB_CLIENT: sqlite3
      DB_FILE: /var/lib/joplin/database.sqlite
      ORIGINS: "'https://joplin.adamoutler.com','https://server.joplin.adamoutler.com', 'http://192.168.1.115:8083','http://192.168.1.115:8088'"

    ports:
      - "8030:8030"
    volumes:
      - data:/var/lib/joplin
    networks:
      - joplin-net
  vieweb:
    image: gri38/django-joplin-vieweb:latest
    depends_on:
      - joplin-terminal-xapi
    environment:
      ORIGINS: "'https://joplin.adamoutler.com','https://server.joplin.adamoutler.com', 'http://192.168.1.115:8083','http://192.168.1.115:8088'"

    restart: unless-stopped
    ports:
      - 8088:8000
    volumes:
      - joplin:/root/.config/joplin:ro
      - joplin-vieweb:/root/.config/joplin-vieweb
    networks:
      - joplin-net
  terminal-xapi:
    image: gri38/joplin-terminal-xapi:latest
    restart: unless-stopped
    volumes:
      - apidata:/root/.config/joplin
    networks:
      - joplin-net
volumes:
  data:
  apidata:

networks:
  joplin-net:
    name: joplin-net