Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Portal with Docker #727

Open
Kruzerson opened this issue Oct 19, 2023 · 9 comments
Open

Admin Portal with Docker #727

Kruzerson opened this issue Oct 19, 2023 · 9 comments

Comments

@Kruzerson
Copy link

Hello. I couldn't find it in the documentation. I don't understand how to start Admin Portal with Docker compose. My configuration file looks like this, but I don't understand where to put the settings to start the Admin Portal. I am using nginx as a reverse proxy. Thanks for your help

version: "3.7"
services:
    server:
        image: padloc/server
        build:
            context: github.com/padloc/padloc.git#main
            dockerfile: Dockerfile-server
        environment:
            PL_DATA_BACKEND: leveldb
            PL_DATA_LEVELDB_DIR: /data
            PL_DATA_ATTACHMENTS_BACKEND: fs
            PL_DATA_ATTACHMENTS_DIR: /attachments
            PL_SERVER_CLIENT_URL: https://padloc.<domain>.com
            PL_EMAIL_BACKEND: smtp
            PL_EMAIL_SMTP_HOST: "mail.<domain>.com"
            PL_EMAIL_SMTP_PORT: 255
            PL_EMAIL_SMTP_SECURE: "false"
            PL_EMAIL_SMTP_IGNORE_TLS: "true"
            PL_EMAIL_SMTP_USER: "<user>"
            PL_EMAIL_SMTP_PASSWORD: "<password>"
            PL_EMAIL_SMTP_FROM: "<from>"
        expose:
            - 3000
        volumes:
            - attachments:/attachments
            - data:/data
        restart: unless-stopped

    pwa:
        image: padloc/pwa
        environment:
            PL_SERVER_URL: https://padloc.<domain>.com/server
            PL_PWA_URL: https://padloc.<domain>.com
            PL_PWA_PORT: 443
            PL_PWA_DISABLE_CSP: "true"
        build:
            context: github.com/padloc/padloc.git#main
            dockerfile: Dockerfile-pwa
        volumes:
            - pwa:/pwa
        command: ["build"]
        restart: on-failure

    nginx:
        image: nginx
        depends_on:
            - server
        restart: always
        volumes:
            - pwa:/pwa
            - ./nginx.conf:/etc/nginx/nginx.conf
            - ./ssl:/etc/nginx/ssl
        ports:
            - 80:80
            - 443:443
           
volumes:
    data:
    attachments:
    pwa:
@celevra
Copy link
Contributor

celevra commented Oct 20, 2023

my compose:

version: "3.7"
services:
    server:
        image: padloc/server
        build:
            context: github.com/padloc/padloc.git#main
            dockerfile: Dockerfile-server
        environment:
            PL_DATA_BACKEND: leveldb
            PL_DATA_LEVELDB_DIR: /data
            PL_DATA_ATTACHMENTS_BACKEND: fs
            PL_DATA_ATTACHMENTS_DIR: /attachments
            PL_SERVER_CLIENT_URL: http://localhost:8081
        ports:
            - 3000:3000
        volumes:
            - /docker/padloc/attachments:/attachments
            - /docker/padloc/data:/data
        restart: unless-stopped
    pwa:
        image: padloc/pwa
        build:
            context: github.com/padloc/padloc.git#main
            dockerfile: Dockerfile-pwa
        environment:
            PL_SERVER_URL: https://xxx/server
            PL_PWA_URL: https://xxx
        ports:
            - 8081:8080
        restart: unless-stopped

my nginx

  location / {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header Host $host;
    proxy_http_version 1.1;
    proxy_pass http://127.0.0.1:8081;
    proxy_redirect off;
  }

  location /server {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header Host $host;
    proxy_http_version 1.1;
    proxy_pass http://127.0.0.1:3000;
    proxy_redirect off;
  }

@thijs-facts
Copy link

Interesting, until now I was unaware that padloc has an admin portal. Where did you read about it?

This might help you out

Let me know what you find 👍

@Kruzerson
Copy link
Author

@thijs-facts

Let me know what you find 👍

I used the variables that are in the document at your link, and there is also this link. But it did not help me

#402

@BrunoBernardino
Copy link
Contributor

BrunoBernardino commented Oct 26, 2023

This is the PR that introduced the functionality: #570

It seems you're not running the admin service at all. It's a separate service/package. You probably want to add it like you did for server, for the /admin route, for example.

@Marco77577
Copy link

I still don't quit get it. Is the panel included in the server or pwa Docker container?

How do I acivate it, or is it activated by default?

@BrunoBernardino
Copy link
Contributor

Nothing is "activated by default". It's not in the server nor in the pwa containers. It's a separate service, like the server or pwa are.

@Marco77577
Copy link

Is there a container for it?

@BrunoBernardino
Copy link
Contributor

You should create one, like you do for pwa and server.

@KiARC
Copy link

KiARC commented Feb 6, 2024

+1 for this, there should be a Dockerfile-admin so that the admin panel can be set up identically to the PWA and server containers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants