ccarney16 / pterodactyl-containers

Pterodactyl Panel within a docker container
230 stars 78 forks source link

/bin/artisan error #144

Closed DiffuseHyperion closed 1 year ago

DiffuseHyperion commented 1 year ago

Whenever I run ./bin/artisan p:user:make in the project's root directory, I get the following error:

-e  Warning! This command is intended for interactive sessions only. Please use docker compose directly for use in scripts.
./artisan: 13: [[: not found
Docker Compose service "panel" does not exist! Exiting...

Running docker compose config --services outputs this:

certbot
cron
daemon
mariadb
redis
panel
worker

Showing that panel was indeed running. I found that changing the script to a bash script fixes this, but i'm unsure if you want to keep it as a sh script for compatibility.

DiffuseHyperion commented 1 year ago

Now that I think about it, /bin/certbot would also be affected by this, since they are practically the same script.

ccarney16 commented 1 year ago

Feel free to use docker-compose exec panel php artisan p:user:make. Those scripts are mainly aliases than writing out the full command. Ill investigate that since it seems to affect some distributions.

luiz-otavio commented 1 year ago

Did you try to get in bin/ directory and then execute this command? If it doesn't work, try to use bash bin/artisan p:user:make, might it will work as should it need.

notfrancois commented 1 year ago

Assuming that you're already running a container with these services. Try to use: docker exec -it <your_container_panel_id> php artisan p:user:make.

Then, you will get the input for create a new user. image

ccarney16 commented 1 year ago

Updated scripts to use bash instead of sh, this should fix the problem.