CaramelFur / Picsur

An easy to use, selfhostable image sharing service like Imgur with built in converting
https://picsur.org/
GNU Affero General Public License v3.0
774 stars 41 forks source link

Docker container fails to start #51

Open mtaanquist opened 1 year ago

mtaanquist commented 1 year ago

Hi there,

I was trying to just spin up a local container to give the project a spin, as the website currently is down, but it fails getting the picsur image fails to reach a running status. It continuously logs the following error:

2023-06-28 19:03:11 picsur           | Internal Error: spawn ETXTBSY
2023-06-28 19:03:11 picsur           |     at ChildProcess.spawn (node:internal/child_process:420:11)
2023-06-28 19:03:11 picsur           |     at Object.spawn (node:child_process:757:9)
2023-06-28 19:03:11 picsur           |     at JM (/picsur/.yarn/releases/yarn-berry.cjs:4:7429)
2023-06-28 19:03:11 picsur           |     at Kd.implementation (/picsur/.yarn/releases/yarn-berry.cjs:392:18472)
2023-06-28 19:03:11 picsur           |     at Kd.exec (/picsur/.yarn/releases/yarn-berry.cjs:395:1583)
2023-06-28 19:03:11 picsur           |     at Kd.run (/picsur/.yarn/releases/yarn-berry.cjs:395:1754)
2023-06-28 19:03:11 picsur           |     at V5 (/picsur/.yarn/releases/yarn-berry.cjs:401:6555)
2023-06-28 19:03:11 picsur           |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-06-28 19:03:11 picsur           |     at async OPe (/picsur/.yarn/releases/yarn-berry.cjs:403:16)
2023-06-28 19:03:11 picsur           |     at async o (/picsur/.yarn/releases/yarn-berry.cjs:403:146)

I am using the docker-compose example mentioned in the README, uncommenting the environment vars.

CaramelFur commented 1 year ago

Hi there, first of all, the website is up again. I did not know it was down.

Could you please give me some more information:

Thanks

mtaanquist commented 1 year ago

Apologies for not including that initially.

docker-compose.yml

version: '3'
services:
  picsur:
    image: ghcr.io/caramelfur/picsur:latest
    container_name: picsur
    ports:
      - '8080:8080'
    environment:
      PICSUR_HOST: '0.0.0.0'
      PICSUR_PORT: 8080

      PICSUR_DB_HOST: picsur_postgres
      PICSUR_DB_PORT: 5432
      PICSUR_DB_USERNAME: picsur
      PICSUR_DB_PASSWORD: picsur
      PICSUR_DB_DATABASE: picsur

      ## The default username is admin, this is not modifyable
      PICSUR_ADMIN_PASSWORD: picsur

      ## Optional, random secret will be generated if not set
      # PICSUR_JWT_SECRET: CHANGE_ME
      # PICSUR_JWT_EXPIRY: 7d

      ## Maximum accepted size for uploads in bytes
      PICSUR_MAX_FILE_SIZE: 128000000
      ## No need to touch this, unless you use a custom frontend
      PICSUR_STATIC_FRONTEND_ROOT: "/picsur/frontend/dist"

      ## Warning: Verbose mode might log sensitive data
      PICSUR_VERBOSE: "true"
    restart: unless-stopped
  picsur_postgres:
    image: postgres:14-alpine
    container_name: picsur_postgres
    environment:
      POSTGRES_DB: picsur
      POSTGRES_PASSWORD: picsur
      POSTGRES_USER: picsur
    restart: unless-stopped
    volumes:
      - picsur-data:/var/lib/postgresql/data
volumes:
  picsur-data:

OS: macOS Ventura 13.4.1 (Apple Silicon) Computer: MacBook Pro 14", M1, 16 GB RAM Docker version: 4.20.1 (110738)

Let me know if there's anything else I can provide that would be of help.

Cheers!

apiening commented 1 year ago

Same issue here!

Switching to 0.5.1 it is working fine.

CaramelFur commented 1 year ago

@apiening could you also provide your system specs and config please?

I can't seem to reproduce the error myself, so hopefully I can use that to find similarities.

Mcicool commented 8 months ago

Apologies for not including that initially.

docker-compose.yml

version: '3'
services:
  picsur:
    image: ghcr.io/caramelfur/picsur:latest
    container_name: picsur
    ports:
      - '8080:8080'
    environment:
      PICSUR_HOST: '0.0.0.0'
      PICSUR_PORT: 8080

      PICSUR_DB_HOST: picsur_postgres
      PICSUR_DB_PORT: 5432
      PICSUR_DB_USERNAME: picsur
      PICSUR_DB_PASSWORD: picsur
      PICSUR_DB_DATABASE: picsur

      ## The default username is admin, this is not modifyable
      PICSUR_ADMIN_PASSWORD: picsur

      ## Optional, random secret will be generated if not set
      # PICSUR_JWT_SECRET: CHANGE_ME
      # PICSUR_JWT_EXPIRY: 7d

      ## Maximum accepted size for uploads in bytes
      PICSUR_MAX_FILE_SIZE: 128000000
      ## No need to touch this, unless you use a custom frontend
      PICSUR_STATIC_FRONTEND_ROOT: "/picsur/frontend/dist"

      ## Warning: Verbose mode might log sensitive data
      PICSUR_VERBOSE: "true"
    restart: unless-stopped
  picsur_postgres:
    image: postgres:14-alpine
    container_name: picsur_postgres
    environment:
      POSTGRES_DB: picsur
      POSTGRES_PASSWORD: picsur
      POSTGRES_USER: picsur
    restart: unless-stopped
    volumes:
      - picsur-data:/var/lib/postgresql/data
volumes:
  picsur-data:

OS: macOS Ventura 13.4.1 (Apple Silicon) Computer: MacBook Pro 14", M1, 16 GB RAM Docker version: 4.20.1 (110738)

Let me know if there's anything else I can provide that would be of help.

Cheers!

By the way. Is there any guideline to make a custom frontend here? I wanna change logo if possible and favicon

CaramelFur commented 8 months ago

@Mcicool No there is no guide for making a custom frontend, the purpose of this option is to allow you write your whole own frontend from scratch, based upon the api spec provided.

You could rebuild the exisiting frontend into this, but there won't be a guide for this, since this not really what the option was meant for.

Mcicool commented 8 months ago

@Mcicool No there is no guide for making a custom frontend, the purpose of this option is to allow you write your whole own frontend from scratch, based upon the api spec provided.

You could rebuild the exisiting frontend into this, but there won't be a guide for this, since this not really what the option was meant for.

Got it. Thank you. Tho the option to just change the logo and favicon would be cool in future.

CaramelFur commented 8 months ago

@Mcicool Ah sorry, but that has already been a feature request in the past, it however won't be something that will be added. Picsur is just not intended to serve as a whitelabel service.

KorbenDev commented 7 months ago

Have the same issue. OS: Unraid 6.12.6 Using the template from the Unraid appstore.

I switched to 0.5.1 (as @apiening ) mentioned and it runs now.

Ultr4vox commented 6 months ago

Have the same issue. OS: Unraid 6.12.6 Using the template from the Unraid appstore.

I switched to 0.5.1 (as @apiening ) mentioned and it runs now.

Trying the same thing on Unraid 6.12.4 without any success so far. (tried latest, as well als 0.5.1) Always got the "Unable to connect to the database" error. But I've created a database with postgres DB, only thing I've changed is the standard Port. Can you tell me if there is anything else I have to do, or recommend another db? Or maybe even tell me the steps to make it work?

I would really appreciate that!