CyberPingU

joined 7 months ago
[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

@nutomic@lemmy.ml , just for debug: I used the Dockerfile provided by ubergeek and I was not able to build up the image (with no cross compile) untill I changed ARG RUST_VERSION=1.76 into ARG RUST_VERSION=latest. This change was NOT necessary on amd64. You said your matrix user was able to run dessaline's image flawlessly on arm64 (raspberry), but this sounds weird to me :-\

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

Got no clue what a movie like xXx becomes

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

Using this image --> https://github.com/ubergeek77/lemmy-docker-multiarch

    #image: dessalines/lemmy:0.19.3
    image: ghcr.io/ubergeek77/lemmy:0.19.3  

the very same docker-compose.yml works even on rpi5 (this instance I'm writing from is the one that now works even on 0.19.3 while with dessaline's one does not). I just changed that line: there must be something in dessaline's way of building the image that my pi doesn't like (if on yours it works).

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

i'm not using ansibile, I'md directly using docker compose... the same file on an amd64 platform works, while on rpi it fails :-\

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

I treid version 0.19.3 on AMD64 platform and it works out of the box. The problem is only on arm64, such as on RPI.

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

By the way, is it only me having this problem?

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago

Hi mate, to be honest I tried both authenticated (on my own instance) and not auth. But what is strange is that from lemmy I can contact a mastodo user and even DM him (my other username in mastodon), but there I don't receive anything -.-

 

@dessalines@lemmy.ml (I mention you since you are the image maintainer...)

Summary

Using docker images > 0.19.1 leads to crash of the lemmy-1 process (exit code 0 and then 139) on ARM64 (not tested on X86_64)

Steps to Reproduce Take a WORKING docker-compose file such as:

version: "3.7"

x-logging: &default-logging
  driver: "json-file"
  options:
    max-size: "50m"
    max-file: "4"

services:

  lemmy:
    image: dessalines/lemmy:0.19.1
    hostname: lemmy
    restart: unless-stopped
    environment:
      - RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
      - RUST_BACKTRACE=full
    ports:
      - "8536:8536"
      - "6669:6669"
    volumes:
      - ./lemmy.hjson:/config/config.hjson:Z
    depends_on:
      - postgres
      - pictrs
    logging: *default-logging

  lemmy-ui:
    # use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
    image: dessalines/lemmy-ui:0.19.1
    ports:
      - "1235:1234"
    environment:
      - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
      - LEMMY_UI_LEMMY_EXTERNAL_HOST=192.168.153.3:8536
      - LEMMY_UI_HTTPS=false
      - LEMMY_UI_DEBUG=true
    depends_on:
      - lemmy
    restart: unless-stopped
    logging: *default-logging
    init: true

  pictrs:
    image: asonix/pictrs:0.5.0-rc.2
    hostname: pictrs
    environment:
      - PICTRS_OPENTELEMETRY_URL=http://otel:4137
      - PICTRS__API_KEY=API_KEY
      - RUST_LOG=debug
      - RUST_BACKTRACE=full
      - PICTRS__MEDIA__VIDEO_CODEC=vp9
      - PICTRS__MEDIA__GIF__MAX_WIDTH=256
      - PICTRS__MEDIA__GIF__MAX_HEIGHT=256
      - PICTRS__MEDIA__GIF__MAX_AREA=65536
      - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
    user: 991:991
    ports:
      - "127.0.0.1:8537:8080"
      - "127.0.0.1:6670:6669"
    volumes:
      - ./volumes/pictrs:/mnt:Z
    restart: unless-stopped
    logging: *default-logging

  postgres:
    image: postgres:16-alpine
    hostname: postgres
    command:
      [
        "postgres",
        "-c",
        "session_preload_libraries=auto_explain",
        "-c",
        "auto_explain.log_min_duration=5ms",
        "-c",
        "auto_explain.log_analyze=true",
        "-c",
        "track_activity_query_size=1048576",
      ]
    ports:
      - "5433:5432"
    environment:
      - POSTGRES_USER=lemmy
      - POSTGRES_PASSWORD=__REDACTED__
      - POSTGRES_DB=lemmy
    volumes:
      - ./volumes/postgres:/var/lib/postgresql/data:Z
    restart: unless-stopped
    logging: *default-logging

Change the image of lemmy (lemmy-ui can be whatever, it's not a problem) to a > 0.19.1

version: "3.7"

x-logging: &default-logging
  driver: "json-file"
  options:
    max-size: "50m"
    max-file: "4"

services:

  lemmy:
    image: dessalines/lemmy:0.19.3
    hostname: lemmy
    restart: unless-stopped
    environment:
      - RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
      - RUST_BACKTRACE=full
    ports:
      - "8536:8536"
      - "6669:6669"
    volumes:
      - ./lemmy.hjson:/config/config.hjson:Z
    depends_on:
      - postgres
      - pictrs
    logging: *default-logging

  lemmy-ui:
    # use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
    image: dessalines/lemmy-ui:0.19.3
    ports:
      - "1235:1234"
    environment:
      - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
      - LEMMY_UI_LEMMY_EXTERNAL_HOST=192.168.153.3:8536
      - LEMMY_UI_HTTPS=false
      - LEMMY_UI_DEBUG=true
    depends_on:
      - lemmy
    restart: unless-stopped
    logging: *default-logging
    init: true

  pictrs:
    image: asonix/pictrs:0.5.0-rc.2
    hostname: pictrs
    environment:
      - PICTRS_OPENTELEMETRY_URL=http://otel:4137
      - PICTRS__API_KEY=API_KEY
      - RUST_LOG=debug
      - RUST_BACKTRACE=full
      - PICTRS__MEDIA__VIDEO_CODEC=vp9
      - PICTRS__MEDIA__GIF__MAX_WIDTH=256
      - PICTRS__MEDIA__GIF__MAX_HEIGHT=256
      - PICTRS__MEDIA__GIF__MAX_AREA=65536
      - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
    user: 991:991
    ports:
      - "127.0.0.1:8537:8080"
      - "127.0.0.1:6670:6669"
    volumes:
      - ./volumes/pictrs:/mnt:Z
    restart: unless-stopped
    logging: *default-logging

  postgres:
    image: postgres:16-alpine
    hostname: postgres
    command:
      [
        "postgres",
        "-c",
        "session_preload_libraries=auto_explain",
        "-c",
        "auto_explain.log_min_duration=5ms",
        "-c",
        "auto_explain.log_analyze=true",
        "-c",
        "track_activity_query_size=1048576",
      ]
    ports:
      - "5433:5432"
    environment:
      - POSTGRES_USER=lemmy
      - POSTGRES_PASSWORD=__REDACTED__
      - POSTGRES_DB=lemmy
    volumes:
      - ./volumes/postgres:/var/lib/postgresql/data:Z
    restart: unless-stopped
    logging: *default-logging

docker-compose up <-- this leads to an exit code 0 and then 139 of contain lemmy-1

Technical Details

File lemmy_log.out

postgres-1 |
postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-1 |
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: starting PostgreSQL 16.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres-1 | 2024-03-19 23:30:55.494 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-1 | 2024-03-19 23:30:55.508 UTC [24] LOG: database system was shut down at 2024-03-19 23:30:51 UTC
postgres-1 | 2024-03-19 23:30:55.519 UTC [1] LOG: database system is ready to accept connections
lemmy-ui-1 | (node:7) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
lemmy-ui-1 | (Use node --trace-deprecation ... to show where the warning was created)
lemmy-ui-1 | Lemmy-ui v0.19.3 started listening on http://0.0.0.0:1234
pictrs-1 | 2024-03-19T23:30:55.258805Z INFO actix_server::builder: starting 4 workers
pictrs-1 | 2024-03-19T23:30:55.258850Z INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime

As you see lemmy-1 doesn't even start nor get logged

On the STDOUT (for example with tag:dev)

root@vega:/opt/lemmy/docker# docker compose up
[+] Running 4/4
 ✔ Container docker-pictrs-1    Created                                                                                                                                           0.0s 
 ✔ Container docker-postgres-1  Created                                                                                                                                           0.0s 
 ✔ Container docker-lemmy-1     Recreated                                                                                                                                         0.8s 
 ✔ Container docker-lemmy-ui-1  Recreated                                                                                                                                         0.1s 
Attaching to lemmy-1, lemmy-ui-1, pictrs-1, postgres-1
postgres-1  | 
postgres-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-1  | 
pictrs-1    | 2024-03-19T23:41:47.038498Z  INFO actix_server::builder: starting 4 workers
pictrs-1    | 2024-03-19T23:41:47.038776Z  INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime
postgres-1  | 2024-03-19 23:41:47.129 UTC [1] LOG:  starting PostgreSQL 16.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
postgres-1  | 2024-03-19 23:41:47.130 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres-1  | 2024-03-19 23:41:47.130 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres-1  | 2024-03-19 23:41:47.140 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-1  | 2024-03-19 23:41:47.152 UTC [24] LOG:  database system was shut down at 2024-03-19 23:33:52 UTC
postgres-1  | 2024-03-19 23:41:47.166 UTC [1] LOG:  database system is ready to accept connections
lemmy-1 exited with code 0
lemmy-1 exited with code 139
lemmy-ui-1  | (node:7) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
lemmy-ui-1  | (Use `node --trace-deprecation ...` to show where the warning was created)
lemmy-ui-1  | Lemmy-ui v0.19.3 started listening on http://0.0.0.0:1234

Version BE >= 0.19.2

[–] CyberPingU@lemmy.cyberveins.eu 1 points 7 months ago* (last edited 7 months ago)

I don't get the question... Docker is awesome for developing, but to put things on production too. It just avoids you the hassle of configuring a virtual machine / server from scratch since you can use prebuilt minimal images of the software you need. If you get in trouble you can restore things easier than on a whole compromised system. An update consists in the vast majority of times in changing a tag inside a docker-compose.yaml file. You have resource optimisation vs virutal machines, and so on. I don't use docker to develop at all, I use it for production. And when you don't need the service you installed anymore, you can just delete it and the system stays clean wihtout orphan files.

[–] CyberPingU@lemmy.cyberveins.eu 10 points 7 months ago* (last edited 7 months ago)

@AlexPewMaster@lemmy.zip I'm in your situation. At the moment on my RPI 5 I'm hosting (via docker) the followings:

  • lemmy
  • mastodon
  • gotosocial
  • peertube
  • pixelfed
  • grav CMS
  • matrix homeserver (synapse)
  • gitea
  • nextcloud And outside docker
  • teleport cluster
  • nginx for some reverse proxy
  • minecraft java 1.20.1 server

For the sake of clarity, here is my docker ps -a | wc -l

cyberpingu@vega:~ $ docker ps -a | wc -l
36
cyberpingu@vega:~ $ 

Almost everything is behind a reverse proxy (on another machine, a rpi4 with KVM) with an argo tunnel. And again

top - 10:38:34 up 9 days, 14:33, 14 users,  load average: 1.06, 0.50, 0.34
Tasks: 544 total,   1 running, 543 sleeping,   0 stopped,   0 zombie
%Cpu0  :  2.0 us,  2.0 sy,  0.0 ni, 96.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
%Cpu1  :  1.3 us,  0.7 sy,  0.3 ni, 97.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
%Cpu2  :  2.6 us,  1.3 sy,  0.0 ni, 95.4 id,  0.3 wa,  0.0 hi,  0.3 si,  0.0 st 
%Cpu3  :  2.7 us,  0.7 sy,  0.0 ni, 96.0 id,  0.3 wa,  0.0 hi,  0.3 si,  0.0 st 
MiB Mem :   8053.5 total,    156.8 free,   5744.0 used,   2683.2 buff/cache     
MiB Swap:  16384.0 total,  11620.0 free,   4764.0 used.   2309.5 avail Mem 

So if the question is "Is it enough a RPI 5"? The answer is yes, it is enough (at least for moderate traffic OFC). If the question is "I have to buy hardware: is a RPI 5 the best choice?" the answer may vary depending on many things. As you've been told, if GPIO is not a problem, maybe a minipc is better.

[–] CyberPingU@lemmy.cyberveins.eu 4 points 7 months ago

@Marsupial@quokk.au that's awesome; I mean, I don't rellay need it to be perfect at once. I was just wondering if I needed to open some "strange ports" (for example, with matrix I need to open 2 ports at once to let the federation work). But as long as I'm reachable from others lemmy istances and vice versa, it's all ok. Thanks for your feedback guys :)

[–] CyberPingU@lemmy.cyberveins.eu 3 points 7 months ago (2 children)

Thanks Matt, apparently I was able at least to federate with lemmy.world since I got your answer... now I "just" have to figure out why I cannot find my user from mastodon (and why if I DM from lemmy my mastodon's user, I get nothing) :)

 

Hello all, i'm trying to selfhost lemmy on an ARM64 with docker. I thought I could have reached my instance from the fediverse, but to be honest i tried to seek it from i.e. mastodon (and even other lemmy instances) but it doesn't simply find anything. On the other hand, from my istance I can find others (mastodon & lemmy). According to the documentation, there is not particular configuration for ports (I'm running it behind a cloudflare argo tunnel). Can anyone advice me where to find documentation that explains how to federate properly?

view more: next ›