commentoplusplus: `exec /commento/commento: exec format error` when setting up with docker on raspberry pi 3b+

Hello!

I am following this tutorial to set up commento++:

https://noted.lol/commento-a-self-hosted-comment-system-for-websites-that-just-works/

When I use that exact dockerfile (while changing the COMMENTO_ORIGIN``to my own) and running docker-compose up`, I get the following logs on my raspberry pi 3b+:.

db_1      |
db_1      | PostgreSQL Database directory appears to contain a database; Skipping initialization
server_1  | exec /commento/commento: exec format error
db_1      |
db_1      | 2022-08-19 16:12:41.758 UTC [1] LOG:  starting PostgreSQL 12.5 on arm-unknown-linux-musleabihf, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 32-bit
db_1      | 2022-08-19 16:12:41.758 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1      | 2022-08-19 16:12:41.758 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1      | 2022-08-19 16:12:41.780 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1      | 2022-08-19 16:12:41.871 UTC [21] LOG:  database system was shut down at 2022-08-19 16:11:44 UTC
db_1      | 2022-08-19 16:12:41.893 UTC [1] LOG:  database system is ready to accept connections
commento_server_1 exited with code 1

FYI: My dockerfile looks like this:

version: '3'

services:
  server:
    image: caroga/commentoplusplus:v1.8.6
    ports:
      - 8080:8080
    environment:
#   I tried both, neither work!
      COMMENTO_ORIGIN: https://commento.mydomain.com
#    COMMENTO_ORIGIN: http://127.0.0.1:8080
      COMMENTO_PORT: 8080
      COMMENTO_POSTGRES: postgres://postgres:postgres@db:5432/commento?sslmode=disable
#    Note: These are copied from the blog post. I want to disable them, but even commenting them out doesn't make the server start.
      COMMENTO_SMTP_HOST: smtp.mailgun.org
      COMMENTO_SMTP_PORT: 587
      COMMENTO_SMTP_USERNAME: mailgun.smtp.user
      COMMENTO_SMTP_PASSWORD: mailgun-password
      COMMENTO_SMTP_FROM_ADDRESS: noreply@noted.lol
    depends_on:
      - db
  db:
    image: postgres:12.5-alpine
    environment:
      POSTGRES_DB: commento
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    volumes:
      - commento_data_volume:/var/lib/postgresql/data

volumes:
  commento_data_volume:

I don’t really know where to go from here. According to the reactions on that blog post, everything should work fine 😃 I must be doing something wrong in a dumb way!


Bonus question:

I plan to run this behind a Caddy reverse proxy, but I don’t think that’s the issue here because the server doesn’t even start up.

In any case, if I run it behind a reverse proxy (So caddy will forward traffic from commento.mydomain.com:80 -> 127.0.0.1:8096, should I set my COMMENTO_ORIGIN to 127.0.0.1:8080 or to commento.mydomain.com? I tried both, neither make the server start up.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for looking into this! Yes you’re right, I have updated the docker build process - please try pulling the latest one as there should be an arm64 image now on dockerhub!