pixeleye-io / pixeleye

The batteries-included platform for visually testing and reviewing your UI; it's even self-hostable! Connect your codebase with our many integrations and dramatically increase your test coverage in minutes.
https://pixeleye.io/home
GNU Affero General Public License v3.0
90 stars 3 forks source link

init-db-user.sh misses execution permissions #318

Closed ngraf closed 5 months ago

ngraf commented 5 months ago

Describe the bug I followed the guide for self-hosting at https://pixeleye.io/docs/guides/self-hosting and failed.

To Reproduce Steps to reproduce the behavior:

  1. Check out pixel repository
  2. Enter "docker" directory of checked out repository.
  3. Create copy of config/template.kratos.yml at config/kratos.yml (It would be nice if this step gets documented! It took me some time to figure this out.)
  4. Run docker compose -f docker-compose-self-hosting.yml up
  5. See error in stdout: postgres-1 | /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/init-user-db.sh: /bin/bash: bad interpreter: Permission denied

Expected behavior Self-hosting works following the guide.

Screenshots image

Desktop (please complete the following information):

Additional context


Possible fix

AlfieJones commented 5 months ago

Thanks for sharing this issue!

I've not been able to reproduce locally with windows or wsl but I've put together a potential fix which should hopefully do the trick 🤞.

Could you test the new docker-compose file?

You can find the file here: https://github.com/pixeleye-io/pixeleye/blob/3879dc05f025eefde3d6ed28e014e45679a72a6c/docker/docker-compose-dev.yml You also need the new dockerFile to be place inside the ./config folder (https://github.com/pixeleye-io/pixeleye/blob/3879dc05f025eefde3d6ed28e014e45679a72a6c/docker/config/Dockerfile.psql)

I've also added a note to the docs to make it clearer that we need the config folder in addition to the compose file.

ngraf commented 5 months ago

What you provided did not solve the issue for me. Only after I executed chmod +x init-user-db.sh, the setup began to work for me.

AlfieJones commented 5 months ago

I forgot to remove the old config 🤦. If you could check this new dockerfile https://github.com/pixeleye-io/pixeleye/blob/fix-self-hosting-permissions/docker/docker-compose-dev.yml that'd be awesome!

ngraf commented 5 months ago

@AlfieJones , alright. Using https://github.com/pixeleye-io/pixeleye/blob/fix-self-hosting-permissions/docker/docker-compose-dev.yml enables me to run docker compose -f docker-compose-dev.yml up succesfully with database initiated. Feel free to patch your project with that yml.

AlfieJones commented 5 months ago

Thanks for your help 👍