-
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
Changes from 40 commits
3a7dc46
aa5820c
1968a97
93fb0b7
9fef8ab
7a40c38
86de9ec
47cdd8e
956e679
e054cb9
b3862a4
aadd164
e564a38
b8d6d59
c5ad334
92c1655
fec23ee
786bac3
a2e0109
76463c9
dffcb25
0a3cc25
d6a01b6
f523ea6
c285f8f
bdffb66
d6d5fd8
318781f
bba697b
9cffe58
a51ff57
7c3d702
4c833e2
863299b
1cb03f5
06a67fe
9188c42
ebe730b
9e6688d
44c05b0
33096fb
6a5f05e
05dc11e
d210baa
01ca75f
a58aa10
628f2c6
bb9bc29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-push-docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
file: docker/standalone/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,16 @@ If you're using a different operating system, you can follow the official Docker | |
|
||
Once you have Docker installed, you can run CtrlPanel standalone Docker by executing the following command: | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. here I think that you should reverse the two, since the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
This command will run the latest CtrlPanel Docker image from Docker Hub and run it. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,60 @@ | ||
version: '3' | ||
|
||
services: | ||
controlpanel_standalone: | ||
build: | ||
context: ../../ | ||
dockerfile: ./docker/standalone/Dockerfile | ||
container_name: controlpanel_standalone | ||
restart: on-failure | ||
controlpanel: | ||
image: ghcr.io/ctrlpanel-gg/panel:latest | ||
container_name: controlpanel_panel | ||
restart: unless-stopped | ||
depends_on: | ||
- redis | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- './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' | ||
Comment on lines
-14
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. It is not running composer install on every container startup. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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:
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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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!!! I re-added the nginx config bind mount on your wish. |
||
networks: | ||
- controlpanel | ||
|
||
mysql: | ||
image: mysql | ||
container_name: controlpanel_mysql | ||
restart: unless-stopped | ||
tty: true | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
MYSQL_DATABASE: ctrlpanel | ||
MYSQL_USER: ctrlpaneluser | ||
MYSQL_PASSWORD: root # change it | ||
MYSQL_ROOT_PASSWORD: root # change it | ||
volumes: | ||
- "./mysql:/var/lib/mysql:delegated" | ||
networks: | ||
- controlpanel | ||
|
||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
container_name: controlpanel_phpmyadmin | ||
restart: unless-stopped | ||
depends_on: | ||
- mysql | ||
ports: | ||
- '8080:80' | ||
environment: | ||
- PMA_HOST=controlpanel_mysql | ||
- PMA_USER=root # change it | ||
- PMA_PASSWORD=root # change it | ||
- PMA_ARBITRARY=1 | ||
networks: | ||
- controlpanel | ||
|
||
redis: | ||
image: redis | ||
container_name: controlpanel_redis | ||
restart: unless-stopped | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- controlpanel | ||
|
||
networks: | ||
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