panel icon indicating copy to clipboard operation
panel copied to clipboard

Docker

Open lancepioch opened this issue 1 year ago • 8 comments

lancepioch avatar Jun 03 '24 01:06 lancepioch

I'm not maintainer at all, but I still have a question :)

Previously, Pterodactyl Panel had a quite long list of variables in its .env.example file. In this PR, the .env.docker file only has a few variables.

Is this intentional?

engels74 avatar Jun 08 '24 19:06 engels74

I'm not maintainer at all, but I still have a question :)

Previously, Pterodactyl Panel had a quite long list of variables in its .env.example file. In this PR, the .env.docker file only has a few variables.

Is this intentional?

From what I saw while testing, this runs a basic panel setup that uses an sqlite db. There are no variables needed for that.

parkervcp avatar Jun 10 '24 12:06 parkervcp

I've been digging into this a bit, both testing the Compose as well as the container builds, and tinkering with Helm. I run entirely in k8s any more, and having everything so tightly coupled in the current Dockerfile causes issues there.

That being said, I was able to split out Caddy and the Panel with Docker Compose (and Helm as well), by simply overriding commands, and editing and mounting the config file. But I do believe the base Dockerfile for the Panel should not bundle Caddy, each component (Caddy, Panel, Redis, etc.) should be it's own service.

From what I've been looking into this evening, what's needed to make this more micro-service friendly is:

  • Use volumes to provide access to /var/www/html files in Compose, rather than COPY . . in the Docker build.
  • Existing Panel Dockerfile should not bundle anything that's not necessary to running php-fpm.
  • Caddyfile needs updated to use Docker overlay network, rather than localhost

Just a note that I'm willing to work on the above if you'd accept a PR. Let me know what you think of the above or if you're looking to go a different direction, happy to help.

luthes avatar Jun 23 '24 07:06 luthes

On the "composer install --no-dev --optimize-autoloader" part from the docker-compose, after reaching it, it returns the error code 2

This is the logs:

Composer could not detect the root package (pelican-dev/panel) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires PHP extension ext-pdo_mysql * but it is missing from your system. Install or enable PHP's pdo_mysql extension.

To enable extensions, verify that they are enabled in your .ini files:
    - /usr/local/etc/php/conf.d/docker-fpm.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-pdo_mysql` to temporarily ignore these required extensions.
The command '/bin/sh -c composer install --no-dev --optimize-autoloader' returned a non-zero code: 2

LumiKattlin avatar Jul 23 '24 15:07 LumiKattlin

@LumiKattlin did you have this issue while building the container? I just tried out a build and it worked.

Have you tried this recently?

parkervcp avatar Jul 28 '24 20:07 parkervcp

Yeah, dw, it ended up being a mistake on my part

ended up working :+1:

LumiKattlin avatar Jul 30 '24 15:07 LumiKattlin

@parkervcp sorry for ping, do you have any ETA on when this will be merged ?

VozDeOuro avatar Sep 18 '24 17:09 VozDeOuro

Well that was ugly

parkervcp avatar Sep 26 '24 23:09 parkervcp