-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker GitHub workflow #4
Docker GitHub workflow #4
Conversation
jameskitt616
commented
May 30, 2024
- Added github workflow to build and publish docker images when releasing a new git tag
- Updated the standalone compose file with necessary programs
- Update Readme instructions for docker compose install.
docker/standalone/README.md
Outdated
Recommended way via Docker Compose: | ||
|
||
1. Copy and configure your docker compose file to your needs `curl -L -o compose.yaml https://raw.githubusercontent.com/Ctrlpanel-gg/panel/blob/main/docker/standalone/compose.yaml`. | ||
2. Create the env file in the same directory as the compose file `touch env_file`. | ||
3. When installing you need to update the `env_file` file. Change those two variables to: `MEMCACHED_HOST=redis` and `REDIS_HOST=redis`, to use the Redis server which comes with the docker compose installation. | ||
|
||
Running as commandline command: | ||
|
||
```bash | ||
docker run -p 80:80 -p 443:443 -v /path/to/website_files:/var/www/html -v /path/to/nginx_config:/etc/nginx/conf.d/ ctrlpanel/ctrlpanel | ||
docker run -p 80:80 -p 443:443 -v /path/to/website_files:/var/www/html -v /path/to/nginx_config:/etc/nginx/conf.d/ ghcr.io/ctrlpanel-gg/panel:latest | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here I think that you should reverse the two, since the docker run
command is the most used :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont understand what you mean. i just changed this so it will use the docker image which will be available on the github container registry. the ctrlpanel/ctrlpanel
does not exist anywhere. Please elaborate what you mean by this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I just mean the two section put the docker command above the docker compose
docker/development/compose.yaml
Outdated
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- '../..:/var/www/html:rw' | ||
- './nginx_config:/etc/nginx/conf.d/:rw' | ||
networks: | ||
- laravel | ||
- controlpanel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to change all control panel to ctrlpanel :) to be like the 0.10
- './website_files:/var/www/html:rw' # change it | ||
- './nginx_config:/etc/nginx/conf.d/:rw' # change it | ||
- './logs:/var/www/html/storage/logs:w' | ||
- './env_file:/var/www/html/.env' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately this will not work it need to be like the dev docker, ctrlpanel is not really made to be inside a docker and is executing some command like composer :( and some people have themes and addons
so you need the panel code to always be saved, there will be an update script dont worry :)
so you need website and nginx to be saved as volume
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
executing composer works fine. it installs composer just as it would for a normal install upon container start. i dont see an issue there. for themes and addons i would just need to know in which folders they would be saved and they could be exposed just like the logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah having composer install at each start is not very great, and most people use theme and addons which are not supported by default they change files of the panel any file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have exactly the same issue whit the pterodactyl panel where I need the file for my modified ptero and each time I start it it’s re uploading default configuration of eggs and it’s very annoying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not running composer install on every container startup.
And for themes and addons, as i said, if you tell me what directories i need to be exposed, i can add a bind mount for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it, please review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current standalone will still not work whit addons and modification, adding by default the project files would be better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not agree with that. I changed it so the project files are exposed by default. Here a couple reasons:
- You yourself told me a few days ago: the lesser permission the better -> the normal user doesn't need access to the project files at all
- It might confuse users since they most likely wont need this anyways.
- It's a weird a bad practice
So i still think having by default the project files NOT exposed would be the much more appropriate way. And the people still got the option to safely expose them at any time later if they need to, without breaking anything. Exposing it by default just introduces different problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like I said ctrlpanel does not support addons correctly in the code and need the project files exposed for that, many people use a modified panel
and the default nginx config will be invalid since it need to be changed
these two things need to be exposed or available for exposing
but the nginx config is really needed (for SSL and things)
and it does not concern permission they are the same if there is a volume or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the nginx config of the docker container needs to be touched for addons, i guess thats alright. but it shouldnt be touched at all for any SSL/TLS stuff, that should absolutely be handled outside of the docker container by a reverse proxy and absolutely NOT by ctrlpanel itself ever!!!
if the docker compose comes with some reverse proxy, thats totally fine and legit. but the nginx inside of the docker container handling the stuff for the panel shouldn't do any of the TLS stuff!
I re-added the nginx config bind mount on your wish.
and I think that's all |
Ready to merge from my side |