-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
328 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!.gitignore | ||
mysql | ||
nginx_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 🐳 Docker Development Environment | ||
|
||
This development environment utilizes standalone Docker with necessary tools pre-configured. | ||
|
||
## Included Services | ||
- Redis | ||
- MySQL | ||
- Tools like phpMyAdmin | ||
|
||
## Not Included Services (for the moment) | ||
- Pterodactyl | ||
- Wings | ||
|
||
Feel free to modify the Docker Compose file to remove any services you already have. | ||
|
||
## Setting Up the Testing Environment | ||
|
||
1. **Manual Setup:** As mentioned in the standalone Docker guide, you will need to manually set up some components. | ||
2. **Custom Configuration:** Modify the CtrlPanel Docker Compose configuration to use your current project as a base. If you point it to an empty folder, it will clone the repository, and you won't see your changes immediately. | ||
|
||
For detailed setup instructions, refer to the standalone Docker documentation. | ||
|
||
⚠ Caution: These instructions have not been finished. Therefore, there may be inaccuracies, instability, or non-functional aspects. Proceed with care. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM php:8.1-fpm | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
nginx \ | ||
nano \ | ||
curl \ | ||
git \ | ||
libcurl4-openssl-dev \ | ||
libicu-dev \ | ||
libzip-dev \ | ||
libpng-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install PHP extensions | ||
RUN pecl install redis \ | ||
&& docker-php-ext-enable redis \ | ||
&& docker-php-ext-install -j$(nproc) \ | ||
mysqli \ | ||
pdo \ | ||
pdo_mysql \ | ||
intl \ | ||
zip \ | ||
gd \ | ||
bcmath \ | ||
&& rm -rf /tmp/* /var/cache/* | ||
|
||
# Install Composer | ||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
|
||
# Create directory for application | ||
RUN mkdir -p /var/default /var/www/html | ||
|
||
# Create user and group for Laravel | ||
RUN groupadd -g 1000 laravel \ | ||
&& useradd -u 1000 -g laravel -ms /bin/bash laravel \ | ||
&& chown -R laravel:laravel /var/default /var/www/html | ||
|
||
# Copy application files | ||
COPY --chown=laravel:laravel . /var/default | ||
|
||
# Copy PHP-FPM configuration | ||
COPY --chown=laravel:laravel ./docker/standalone/php/www.conf /usr/local/etc/php-fpm.d/ | ||
|
||
# Copy Nginx configuration | ||
COPY --chown=laravel:laravel ./docker/standalone/nginx/nginx.conf /etc/nginx/nginx.conf | ||
# Create directory for Nginx logs | ||
RUN mkdir -p /var/log/nginx && chown -R laravel:laravel /var/log/nginx | ||
|
||
# Expose ports | ||
EXPOSE 80 443 | ||
|
||
# Copy startup script | ||
COPY --chown=laravel:laravel ./docker/standalone/scripts/startup.sh /usr/local/bin/startup-script.sh | ||
# Make startup script executable | ||
RUN chmod +x /usr/local/bin/startup-script.sh | ||
|
||
# Set the working directory | ||
WORKDIR /var/www/html | ||
|
||
# Start the startup script | ||
CMD ["/usr/local/bin/startup-script.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 🐳 Standalone Docker | ||
|
||
The CtrlPanel standalone Docker enables users to run CtrlPanel easily with just a few clicks. | ||
|
||
To run CtrlPanel standalone Docker, you need to have Docker installed on your machine. Some server operating systems like Unraid, TrueNAS, etc.. already have Docker installed, making it even easier to run CtrlPanel. | ||
If you're using a different operating system, you can follow the official Docker installation guide [here](https://docs.docker.com/get-docker/). | ||
|
||
Once you have Docker installed, you can run CtrlPanel standalone Docker by executing the following command: | ||
|
||
Running as commandline command: | ||
|
||
```bash | ||
docker run -p 80:80 -p 443:443 -v /path/to/website_files:/var/www/html ghcr.io/ctrlpanel-gg/panel:latest | ||
``` | ||
|
||
This command will run the latest CtrlPanel Docker image from GitHub Container Registry and run it. | ||
|
||
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. | ||
|
||
The control panel will be available at http://localhost/install and will be a completely fresh installation. | ||
|
||
Note that while the container contains the full CtrlPanel installation, you will still need to perform the basic setup. You can find instructions for this [here](https://ctrlpanel.gg/docs/Installation/getting-started#basic-setup). | ||
|
||
## 🏗️ Migrating from a previous bare metal installation | ||
|
||
If you are migrating, from a previous bare metal installation, you can follow the instructions [here]() (Soon on documentation). | ||
|
||
## 🧰 Creating your own Docker image | ||
|
||
If you want to create your own Docker image, you can follow the instructions [here]() (Soon on documentation). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
services: | ||
ctrlpanel_standalone: | ||
image: ghcr.io/ctrlpanel-gg/panel:latest | ||
container_name: ctrlpanel_standalone | ||
restart: unless-stopped | ||
depends_on: | ||
- redis | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- './logs:/var/www/html/storage/logs:w' | ||
- './env_file:/var/www/html/.env' | ||
- './website_files:/var/www/html:rw' # optionally remove this bind mount, it's not needed unless you want access to all project files, to modify the project with addons/plugins. | ||
- './nginx_config:/etc/nginx/conf.d/:rw' # optionally remove this bind mount, it's not needed unless you want to modify the project with addons/plugins. (dangerous to edit) | ||
networks: | ||
- ctrlpanel | ||
|
||
mysql: | ||
image: mysql | ||
container_name: ctrlpanel_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: | ||
- ctrlpanel | ||
|
||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
container_name: ctrlpanel_phpmyadmin | ||
restart: unless-stopped | ||
depends_on: | ||
- mysql | ||
ports: | ||
- '8080:80' | ||
environment: | ||
- PMA_HOST=ctrlpanel_mysql | ||
- PMA_USER=root # change it | ||
- PMA_PASSWORD=root # change it | ||
- PMA_ARBITRARY=1 | ||
networks: | ||
- ctrlpanel | ||
|
||
redis: | ||
image: redis | ||
container_name: ctrlpanel_redis | ||
restart: unless-stopped | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- ctrlpanel | ||
|
||
networks: | ||
ctrlpanel: |
Oops, something went wrong.