Jopin Docker-compose搭建

db:
        image: postgres:13
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"  
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=123456
            - POSTGRES_USER=admin
            - POSTGRES_DB=joplindb
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300" 
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=https://a.b.com
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=123456
            - POSTGRES_DATABASE=joplindb
            - POSTGRES_USER=admin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

Jopin Server服务器 宝塔面板nginx反向代理设置

location ^~ /  
{  
        proxy_redirect off;  
        proxy_set_header Host $host;  
        proxy_set_header X-Forwarded-Proto $scheme;  
        proxy_set_header X-Real-IP $remote_addr;  
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  
        proxy_set_header Upgrade $http_upgrade;  
        proxy_set_header Connection $connection_upgrade;  
        client_max_body_size 100m;  
        proxy_pass http://127.0.0.1:22300;  
}
如果觉得我的文章对你有用,请随意赞赏