version: '3'

services:
    db:
        image: postgres:16
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=ganopacha
            - POSTGRES_USER=gano
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=notepad.gano.duckdns.org
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=ganopacha
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=gano
            - POSTGRES_PORT=192.168.3.30012
            - POSTGRES_HOST=db
