Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ne7sn-0001qM-Mi for pgsql-admin@arkaria.postgresql.org; Tue, 12 Apr 2022 04:12:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ne7sl-0002uZ-Q8 for pgsql-admin@arkaria.postgresql.org; Tue, 12 Apr 2022 04:11:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ne7sk-0002uK-VN for pgsql-admin@lists.postgresql.org; Tue, 12 Apr 2022 04:11:59 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ne7sd-0000ZV-To for pgsql-admin@lists.postgresql.org; Tue, 12 Apr 2022 04:11:57 +0000 Received: by mail-yb1-xb30.google.com with SMTP id v77so12909348ybi.12 for ; Mon, 11 Apr 2022 21:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wyZf+Ue/MubkzSQq71x6Z05lLD6VXUCCrXVAs/rJQ6s=; b=Ga3KC1VvG9ji3sRARI0PwQ1NX8AC+bLa80F7HVUN4M/m18FIeC+Hmomt/wGUC2vfav SbZd4z9I4kWQvoFDPYos8Kkz42/CWaPLmZUnb1aNZTXfNaoF7WJXF4JgNTd1XthKGSQV Q2HdeFDYKFD/TcdR/DurM6MTJXyxv4EJ/ukro7YrDMsv/taIL8f93bX4J2A2cq+m7oqX pfdb3m4Yyn9H4M8+MZFtc1UWQ8G8e33xJpW+3CL8dhr6QB+rgq0Yc1NcFu7RAd1cdZxW 9o5RdaDnZI96zb3Khyk16CBPAnipE9vVjvtIHKy7pgmyzOHOuCYhEUK8OeIKsNrXGsJC U7jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wyZf+Ue/MubkzSQq71x6Z05lLD6VXUCCrXVAs/rJQ6s=; b=k/xGj06L4h4PRXk+H2D7+UVogwylKArzssASCqfjmrwl6ygioo0VhvD3j+G/SJxTJP p2hKq2RXbf1nmYdu58rR+KiF/87yhZSTz40Cs+4R/XNDHVVWsVRdWs+XfWx6Au/ducT/ Pa60tf/JqCMndgyOaRBBB6O7IKxYW/KMfu3G4LhwOq9JhqAT+/X/fv17yfc5J4PGhDPm chCwAZv6RJwXpTTD+o/w+AyY2u7BzbLJwxBbfc8mLMOU4mRd92BQu85oJ4TB6BtgRthM hH5rWYWLXmZSmUxpha6uNDnEkuU2OX2TXrxjTM9F9WtibbObGhkNe0Jo0kKmK5XtkpL1 3h2Q== X-Gm-Message-State: AOAM5302k1thF3k7FxfSUyeBZEQbf4ZNryQybmQTg+3eC+/bbne8TC0o v5kBPngNV2f34QURKWFln61+29lQJR5Dxr9G0hnBs+iO2t5LaNlXaa5wGhvoAsypdAiGGt3UqsP rZKxXMmZ9TruY7VJ/4Dq9asGfSI+aFxOdLlAGSgndhfZy3VyrqT1YdgTzQEKVP8JiHenmR9Mot3 tFayhzwyqf4XInpJOaw9n8WxMfNt5Jmba358bI8icRxtWT2ePML+UsMReCTbj6XmLamRr7+vU= X-Google-Smtp-Source: ABdhPJwrJTBD8C8/4ZOOXtC0fKeakUuy0n8HISqHUhRuzrX0BPZdeJqmFO5Fs5B9jva4WdWcehvDeztfH9EaG2s7MXo= X-Received: by 2002:a5b:c51:0:b0:641:15b5:40fc with SMTP id d17-20020a5b0c51000000b0064115b540fcmr11728548ybr.19.1649736710943; Mon, 11 Apr 2022 21:11:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yogesh Mahajan Date: Tue, 12 Apr 2022 09:41:14 +0530 Message-ID: Subject: Re: pgAdmin Docker container: specify web URL path prefix? To: Glen Bakeman Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000a10f5805dc6d4288" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a10f5805dc6d4288 Content-Type: text/plain; charset="UTF-8" Hi Glen, Please refer to the last point at this web-page for hosting pgadmin4 under subdirectory with Traefik. Here is example when pgadmin4 is hosted under /pgadmin4/ docker run --name "pgadmin4" \ -e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \ -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \ -e "SCRIPT_NAME=/pgadmin4" \ -l "traefik.frontend.rule=PathPrefix:/pgadmin4" \ -d dpage/pgadmin4 Thanks, Yogesh Mahajan EnterpriseDB On Tue, Apr 12, 2022 at 6:23 AM Glen Bakeman wrote: > Hi everyone, > > I'm getting into containerized hosting, and I'd like to setup the > pgAdmin docker container with a reverse proxy (Traefik). Traefik > supports Path Prefix proxying for services (i.e, I'd like to access > pgAdmin at host.example.com/pgadmin/). The issue seems to be that > pgAdmin automatically rewrites requests to host.example.com/login, which > breaks the proxy. > > I can't seem to find any options that allow us to specify the web path > pgAdmin uses, from the perspective of configuring the docker container. > Can anyone please confirm this? > > Thanks in advance, > > Glen > > > > --000000000000a10f5805dc6d4288 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Glen,

Please refer to the last point at this web-page for hosting pgadm= in4 under subdirectory with Traefik.
Here is example when p= gadmin4 is hosted under /pgadmin4/
docker run --name "pgadmin4&quo=
t; \
    -e "PGADMIN_DEFAULT_EMAIL=3Duser@domain.com" \
    -e "PGADMIN_DEFAULT_PASSWORD=3DSuperSecre=
t" \
    -e "SCRIPT_NAME=3D/pgadmin4" =
\
    -l "traefik.frontend.rule=3DPathPrefix:/p=
gadmin4" \
    -d dpage/pgadmin4

Thanks,
Yogesh Mahajan
EnterpriseDB

=
On Tue= , Apr 12, 2022 at 6:23 AM Glen Bakeman <gbakeman@live.com> wrote:
Hi everyone= ,

I'm getting into containerized hosting, and I'd like to setup the <= br> pgAdmin docker container with a reverse proxy (Traefik). Traefik
supports Path Prefix proxying for services (i.e, I'd like to access pgAdmin at host.example.com/pgadmin/). The issue seems to be tha= t
pgAdmin automatically rewrites requests to host.example.com/login, = which
breaks the proxy.

I can't seem to find any options that allow us to specify the web path =
pgAdmin uses, from the perspective of configuring the docker container. Can anyone please confirm this?

Thanks in advance,

Glen



--000000000000a10f5805dc6d4288--