Repository: penpot/penpot

Issue #1548: Docker / penpot_penpot-backend_1: no ports opened, frontend could not connect
Created: 2022-02-05T13:27:48Z
Describe the bug
No backend ports are opened in docker self-hosted version, which results in frontend errors (see details below).
To Reproduce
Steps to reproduce the behavior:

Download penpot docker files as described in https://help.penpot.app/technical-guide/getting-started/

wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env


run the container

docker-compose -p penpot -f docker-compose.yaml up -d


Check the running containers

364f94b06c2f   penpotapp/frontend:latest            "/bin/bash /entrypoi…"   7 minutes ago   Up 7 minutes    0.0.0.0:9001->80/tcp, :::9001->80/tcp   penpot_penpot-frontend_1
995ac3e66235   penpotapp/backend:latest             "/bin/bash run.sh"       7 minutes ago   Up 7 minutes                                            penpot_penpot-backend_1
456ad8bf622a   postgres:13                          "docker-entrypoint.s…"   7 minutes ago   Up 7 minutes    5432/tcp                                penpot_penpot-postgres_1
6230c38f3775   penpotapp/exporter:latest            "/usr/local/nodejs/b…"   7 minutes ago   Up 7 minutes                                            penpot_penpot-exporter_1
8b7a26cc2de9   redis:6                              "docker-entrypoint.s…"   7 minutes ago   Up 7 minutes    6379/tcp                                penpot_penpot-redis_1


Open the url: http://10.0.0.2:9001

Expected behavior
PenPot login is shown.
Desktop (please complete the following information):

OS: Windows 10
Browser: Firefox
Version: 96

If self-hosted instance, add OS and runtime information to help explain your problem.

OS Version: Ubuntu 20.04 LTS

Also provide Docker commands or docker-compose file if possible and if proceed.x


Docker / Docker-compose Version:  Docker Version:  20.10.9 / docker-compose version 1.29.2, build 5becea4c


Image: (see above)


Frontend Stack Trace (if self-hosted)

8#8: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.1, server: _, request: "GET /api/rpc/query/profile HTTP/1.1", upstream: "http://172.18.0.5:6060/api/rpc/query/profile", host: "10.0.0.2:9001"


Backend Stack Trace (if self-hosted)

 I app.http.session - action="initialize session updater" max-batch-age="PT5M" max-batch-size="200"
 I app.http - host="localhost" msg="starting http server" name="http" port="6060"


(...)

I app.worker - action="start worker" name="worker" queue="default"
I app.srepl - host="127.0.0.1" msg="initializing server repl" name="main" port="6062"
I app.main - msg="welcome to penpot" version="1.11.0-beta-6445-g7710ffcbf"

Duplicate issue #1550: Bad Gateway when starting from docker.
Created: 2022-02-05T23:27:57Z
Describe the bug
Spin up the docker images.
Visit locahost:9001

Bad Gateway
To Reproduce
10:11:46 ~/Projects/experimental_design_tool$ wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
--2022-02-06 10:11:54--  https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1283 (1.3K) [text/plain]
Saving to: ‘docker-compose.yaml’

docker-compose.yaml 100%[===================>]   1.25K  --.-KB/s    in 0s      

2022-02-06 10:11:54 (36.9 MB/s) - ‘docker-compose.yaml’ saved [1283/1283]

10:11:54 ~/Projects/experimental_design_tool$ wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env
--2022-02-06 10:12:06--  https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2588 (2.5K) [text/plain]
Saving to: ‘config.env’

config.env          100%[===================>]   2.53K  --.-KB/s    in 0s      

2022-02-06 10:12:06 (19.3 MB/s) - ‘config.env’ saved [2588/2588]


10:12:06 ~/Projects/experimental_design_tool$ docker-compose -p penpot -f docker-compose.yaml up -d
Creating network "penpot_penpot" with the default driver
Creating volume "penpot_penpot_postgres_data" with default driver
Creating volume "penpot_penpot_assets_data" with default driver
Pulling penpot-exporter (penpotapp/exporter:latest)...
latest: Pulling from penpotapp/exporter
0e29546d541c: Already exists
7ef74b25d47a: Pull complete
7eb059ed57f6: Pull complete
4f6f2370bc1b: Pull complete
a42ad0e6425d: Pull complete
226d56ea665a: Pull complete
152dd192b610: Pull complete
Digest: sha256:ba0b995b7229350d9366c783d3163d8ca04fe07c568de8a26dae38172a52a3c5
Status: Downloaded newer image for penpotapp/exporter:latest
Pulling penpot-postgres (postgres:13)...
13: Pulling from library/postgres
5eb5b503b376: Pull complete
daa0467a6c48: Pull complete
7cf625de49ef: Pull complete
bb8afcc973b2: Pull complete
c74bf40d29ee: Pull complete
2ceaf201bb22: Pull complete
1255f255c0eb: Pull complete
d27501cd0cca: Pull complete
46d098a50510: Pull complete
415988e25784: Pull complete
f37265417882: Pull complete
4ad62bb529b5: Pull complete
781e3e6e8401: Pull complete
Digest: sha256:2e2e213c0fe4d1229373bebf114f255f68d86fba9e9f30e9bcc08e92cdf7b5b4
Status: Downloaded newer image for postgres:13
Pulling penpot-redis (redis:6)...
6: Pulling from library/redis
5eb5b503b376: Already exists
6530a7ea3479: Pull complete
91f5202c6d9b: Pull complete
9f1ac212e389: Pull complete
82c311187b72: Pull complete
da84aa65ce64: Pull complete
Digest: sha256:0d9c9aed1eb385336db0bc9b976b6b49774aee3d2b9c2788a0d0d9e239986cb3
Status: Downloaded newer image for redis:6
Pulling penpot-backend (penpotapp/backend:latest)...
latest: Pulling from penpotapp/backend
08c01a0ec47e: Pull complete
05b2c8bf0726: Pull complete
173299d397e8: Pull complete
b3310959cdca: Pull complete
Digest: sha256:a012f09bb9b6601a938ac84616df4f10af543e6512d7b8e40a0826174e9b56cf
Status: Downloaded newer image for penpotapp/backend:latest
Pulling penpot-frontend (penpotapp/frontend:latest)...
latest: Pulling from penpotapp/frontend
5eb5b503b376: Already exists
1ae07ab881bd: Pull complete
78091884b7be: Pull complete
091c283c6a66: Pull complete
55de5851019b: Pull complete
b559bad762be: Pull complete
a56677d5b449: Pull complete
ab62a03566a8: Pull complete
a02e571b838b: Pull complete
2a7a14b1e8fd: Pull complete
Digest: sha256:b8e39ae6816a1e87e6cc5b320a88c9a1a588e832d9c762f1ba16666443d6fc0e
Status: Downloaded newer image for penpotapp/frontend:latest
Creating penpot_penpot-redis_1    ... done
Creating penpot_penpot-exporter_1 ... done
Creating penpot_penpot-postgres_1 ... done
Creating penpot_penpot-backend_1  ... done
Creating penpot_penpot-frontend_1 ... done


Visit localhost
see bad gateway.

10:13:47 ~/Projects/experimental_design_tool$ docker-compose logs
Attaching to 

10:14:31 ~/Projects/experimental_design_tool$ code . 

10:17:10 ~/Projects/experimental_design_tool$ docker exec -ti penpot_penpot-backend_1 ./manage.sh create-profile
[2022-02-05 23:17:20.272] I app.metrics - action="initialize metrics"
[2022-02-05 23:17:20.286] I app.db - action="initialize connection pool" name="main" uri="postgresql://penpot-postgres/penpot"
Email:  me@me.com
Full Name:  Nigel Thorne
Password:  
User created successfully.

10:17:36 ~/Projects/experimental_design_tool$ docker ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED         STATUS         PORTS                                   NAMES
40114785a6a7   penpotapp/frontend:latest   "/bin/bash /entrypoi…"   6 minutes ago   Up 6 minutes   0.0.0.0:9001->80/tcp, :::9001->80/tcp   penpot_penpot-frontend_1
2f0cac8f73ae   penpotapp/backend:latest    "/bin/bash run.sh"       6 minutes ago   Up 6 minutes                                           penpot_penpot-backend_1
0357ae84fd5a   postgres:13                 "docker-entrypoint.s…"   6 minutes ago   Up 6 minutes   5432/tcp                                penpot_penpot-postgres_1
86cbb189160e   redis:6                     "docker-entrypoint.s…"   6 minutes ago   Up 6 minutes   6379/tcp                                penpot_penpot-redis_1
d3f90702cd02   penpotapp/exporter:latest   "/usr/local/nodejs/b…"   6 minutes ago   Up 6 minutes                                           penpot_penpot-exporter_1


Expected behavior
Either a landing page with a create user account link. Ideally no error :)
Screenshots
see above
Desktop (please complete the following information):
ubuntu running docker
Chrome browser
Environment (please complete the following information):
self hosted. docker.

Closing comment (2022-02-06T07:39:06Z): Duplicate of #1548