repman-io / repman

Repman - PHP Repository Manager: packagist proxy and host for private packages
https://repman.io
MIT License
519 stars 107 forks source link

Internal Server Error #632

Open philip1337 opened 1 year ago

philip1337 commented 1 year ago

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:

Docker Version: Docker version 20.10.22, build 3a2c30b

Kind regards Philip

paynl-peter commented 1 year ago

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:

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').

philip1337 commented 1 year ago

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

paynl-peter commented 1 year ago

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).

slappyslap commented 1 year ago

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

Thanks

marcosvile commented 1 year ago

Try to give write permission to directory var/

chmod +w var/
philip1337 commented 1 year ago

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

aprokopenko commented 1 year ago

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