Docker quickly builds joplin server

I created a github project to solve some problems encountered in building joplin server, such as Invalid origin: http://192.168.2.81:22300

You can modify the database account configuration, but this has no effect. Docker does not map the access port. By default, it accesses localhost:9090 or the 9090 port of the current ip. If you want to change the access port, you can modify the ngnix access port.

It takes time for the joplin server to run. If the access shows 502, please wait a few minutes and re-access

github project :

joplin-server-docker

If this item solved your problem, please give it a small star

docker-compose.yml

version: '3'
services:
    db:
        image: postgres:13.1
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - POSTGRES_PASSWORD=postgresqljoplin
            - POSTGRES_USER=user
            - POSTGRES_DB=joplin
        networks:
            service1_net:
                ipv4_address: 172.22.0.101
    app:
        image: joplin/server:latest
        depends_on:
            - db
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=http://172.22.0.100:22300
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=postgresqljoplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=user
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

        networks:
            service1_net:
                ipv4_address: 172.22.0.100


    

    nginx:
        container_name: nginx 
        image: nginx
        restart: always
        ports:
        - 9090:80
        volumes:
        - $PWD/default.conf:/etc/nginx/conf.d/default.conf
        networks:
            service1_net:
                ipv4_address: 172.22.0.102




networks:
  service1_net:
    ipam:
      driver: default
      config:
        - subnet: 172.22.0.0/16```

default.conf

server {
server_name 172.22.0.102;
listen 80;
#return 301 https://$server_name$request_uri;
location / {
proxy_pass http://172.22.0.100:22300;
proxy_set_header Host 172.22.0.100:22300;
sub_filter 'http://172.22.0.100:22300/' '/';
sub_filter 'http://172.22.0.100:22300' '/';
sub_filter 'http://172.22.0.100:22300/' '';
sub_filter_once off;
absolute_redirect off;
client_max_body_size 1024M;

}

}