repman icon indicating copy to clipboard operation
repman copied to clipboard

Internal Server Error

Open philip1337 opened this issue 3 years ago • 7 comments

Hello,

I've tried to install repman now for a few hours in our docker environment and I gave up.

There are several issues with the permissions. The application in the initial setup doesn't work,. Giving all folders the full permissions gets the app to work (since I don't get any log entries I don't know what the issue is).

Reproducing:

  • git clone https://github.com/repman-io/repman.git (f25582a9327d0b8781afac16540d7aadaa8f194c)
  • cd repman
  • docker-compose up -d
  • browse url: https://x.x.x.x -- 500 Internal Server Error

Docker Version: Docker version 20.10.22, build 3a2c30b

Kind regards Philip

philip1337 avatar Dec 20 '22 20:12 philip1337

Hello philip1337,

We had also some problems, we changed/modified things and finally got it working. I do not remember if a "500 internal server" was one of them. You need also do an "composer install" to get it working and in your steps I can't see that one.

It was something like below:

  • git clone https://github.com/repman-io/repman.git
  • cd repman/
  • composer install --ignore-platform-reqs
  • apt-get install php8.1-xm php8.1-xml
  • composer install --ignore-platform-reqs
  • docker-compose up

I made a fork with our changes. Its a bit of a mess (to many commits) because there are many small changes, but in the end we got it working. We also had to change the owner of the 'var' and 'public' directory with user '82' ('www-data' on the containers) and we replaced the crontab solution with a different one (yacron) to run 2 containers as user 'www-data' to get rid of some permission problems (to delete packages through the web interface, before the change the files were saved as 'root').

paynl-peter avatar Dec 28 '22 15:12 paynl-peter

Hi paynl-peter,

I assume the composer install you ran inside the containers?

I really got frustrated trying to get this stuff to work. The idea of having a private package repository was nice. In the end I'm using the gitlab package registry now (not the best but enough).

Kind regards Philip

philip1337 avatar Dec 29 '22 07:12 philip1337

Hello philip1337,

No, not inside the containers. It was needed on the server where we run the commands and build the containers. It took me (yes, with some help) some of time to got it working correctly (and without any problems).

paynl-peter avatar Dec 29 '22 12:12 paynl-peter

Hi @philip1337 Did you have some logs, I'm not able to reproduce this.

Thanks

slappyslap avatar Mar 13 '23 18:03 slappyslap

Try to give write permission to directory var/

chmod +w var/

marcosvile avatar May 19 '23 00:05 marcosvile

Hey, currently I don't have a running setup anymore. I've a running prod environment now. The old stuff I've removed so I can't tell you exactly what the issue was. Only thing I can mention is that it was a blank setup.

Basically checking out the repository (/opt/docker/containers/repman) and doing docker-compose. All of it happening as "root".

Kind regards Philip

philip1337 avatar Jun 04 '23 17:06 philip1337

For those who also trying to install it, I was successful with such steps:

  1. chmod -R 777 var public (don't know is it required, will check without this step later in case I have time)
  2. docker compose up database (wait for load, then ctrl+c)
  3. docker compose up app (wait for load, then ctrl+c, install process has to be completed without errors)
  4. docker compose up - finally launched the whole stack.

in docker-compose.override.yml added custom nginx port and mailhog for mail:

version: '3.4'

x-restart-policy: &restart_policy
  restart: unless-stopped

services:
  nginx:
    ports:
      - 8443:443

  mailhog:
    <<: *restart_policy
    image: axllent/mailpit
    ports:
      - "8025:8025"

in .env.docker:

APP_HOST=repman.test:8443

aprokopenko avatar Sep 11 '23 14:09 aprokopenko