• 5 Posts
  • 12 Comments
Joined 11 months ago
cake
Cake day: August 15th, 2023

help-circle



  • iturnedintoanewt@lemm.eeOPtoSelfhosted@lemmy.worldBasic docker networking?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months ago

    Wow thanks! Let me take a look, I missed the portainer part! Sigh…I followed through the instructions. I deleted the previous stack, and created a new one, this time all the way from portainer. This time I ONLY modified the .env file, well and according to the instructions the .yaml referring to the .env as stack.env now. Made it deploy…and nothing. Still getting the same mkdir error :(


  • iturnedintoanewt@lemm.eeOPtoSelfhosted@lemmy.worldBasic docker networking?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months ago

    Thanks…I did follow their guide, step by step. The only thing that I customized was the immich uploads folder, which I want it to go to my NAS. I have it set up on an NFS mount handled by proxmox, and then it’s just a transparent bind mount in the LXC. The user in the lxc container has read/write access to this location, and docker runs on this same user. But I reckon I’m addressing this in docker in a horribly messed way, as I’ve never used it before. Checking the docker logs immich_server, I’m getting this:

    [Nest] 7  - 04/08/2024, 9:53:08 AM     LOG [SystemConfigService] LogLevel=log (set via system config)
    node:fs:1380
      const result = binding.mkdir(
                             ^
    
    Error: EACCES: permission denied, mkdir 'upload/library'
        at mkdirSync (node:fs:1380:26)
        at StorageRepository.mkdirSync (/usr/src/app/dist/repositories/storage.repository.js:112:37)
        at StorageService.init (/usr/src/app/dist/services/storage.service.js:30:32)
        at ApiService.init (/usr/src/app/dist/services/api.service.js:72:29)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async ApiModule.onModuleInit (/usr/src/app/dist/app.module.js:58:9)
        at async callModuleInitHook (/usr/src/app/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)
        at async NestApplication.callInitHook (/usr/src/app/node_modules/@nestjs/core/nest-application-context.js:223:13)
        at async NestApplication.init (/usr/src/app/node_modules/@nestjs/core/nest-application.js:100:9)
        at async NestApplication.listen (/usr/src/app/node_modules/@nestjs/core/nest-application.js:169:33) {
      errno: -13,
      code: 'EACCES',
      syscall: 'mkdir',
      path: 'upload/library'
    
    
    

    Let’s see… So let’s say my LXC container has a /mnt/NAS-immich-folder path, already mounted and with rw permissions. Then I edited my docker-compose.yml volumes line as follows:

        volumes:
          - /mnt/NAS-immich-folder:/mnt/immich
          - ${UPLOAD_LOCATION}:/mnt/immich
          - /etc/localtime:/etc/localtime:ro
    

    And my .env path looks like:

    # The location where your uploaded files are stored
    UPLOAD_LOCATION=/media/immich
    
    

    …I’m sure I’m doing something horribly wrong besides the no-no of docker over LXC…Is there anything messed in these paths? What am I doing wrong? Thanks so much!


  • Thanks! When I type my LXC’s IP:2283, I get unable to connect. I checked the docker-compose.yml and the port seems to be 2283:3001, but no luck at either. Is there anything that needs to be done on docker’s network in order to…“publish” a container to the local network so it can be seen? Or any docker running with a port can be reached via the host’s IP with no further config? Checking the portainer’s networks section, I can see an ‘immich-default’ network using bridge on 172.18.0.0/16, while the system’s bridge seems to be running at 172.17.0.0/16. Is this the correct defaults? Should I change anything?

    Thanks!


  • Sure…But proxmox is already there. It’s installed and it runs 5VMs and about 10 containers. …I’m not going to dump all that just because I need docker…and I’m not getting another machine if I can get use that. So…sure, there might be overhead, but I saw some other people doing it, and the other alternative I saw was running docker on a VM…which is even more overhead. And I fear running it on the proxmox server bare metal, it might conflict with how it manages the LXC containers.