forked from Ctrlpanel-gg/panel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: pull request #4 from jameskitt616/docker-github-workflow
Docker GitHub workflow
- Loading branch information
Showing
7 changed files
with
131 additions
and
31 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 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 |
---|---|---|
@@ -1,60 +1,60 @@ | ||
services: | ||
# TODO: add wings and pterodactyl | ||
controlpanel_standalone: | ||
ctrlpanel_development: | ||
build: | ||
context: ../../ | ||
dockerfile: ./docker/standalone/Dockerfile | ||
container_name: controlpanel_development | ||
restart: on-failure | ||
container_name: ctrlpanel_development | ||
restart: unless-stopped | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- '../..:/var/www/html:rw' | ||
- './nginx_config:/etc/nginx/conf.d/:rw' | ||
networks: | ||
- laravel | ||
- ctrlpanel | ||
|
||
mysql: | ||
image: mysql | ||
container_name: controlpanel_mysql | ||
container_name: ctrlpanel_mysql | ||
restart: unless-stopped | ||
tty: true | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
MYSQL_DATABASE: controlpanel | ||
MYSQL_USER: controlpanel | ||
MYSQL_DATABASE: ctrlpanel | ||
MYSQL_USER: ctrlpaneluser | ||
MYSQL_PASSWORD: root | ||
MYSQL_ROOT_PASSWORD: root | ||
volumes: | ||
- "./mysql:/var/lib/mysql:delegated" | ||
networks: | ||
- laravel | ||
- ctrlpanel | ||
|
||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
container_name: controlpanel_phpmyadmin | ||
container_name: ctrlpanel_phpmyadmin | ||
depends_on: | ||
- mysql | ||
ports: | ||
- '8080:80' | ||
environment: | ||
- PMA_HOST=controlpanel_mysql | ||
- PMA_HOST=ctrlpanel_mysql | ||
- PMA_USER=root | ||
- PMA_PASSWORD=root | ||
- PMA_ARBITRARY=1 | ||
networks: | ||
- laravel | ||
- ctrlpanel | ||
|
||
redis: | ||
image: redis | ||
container_name: controlpanel_redis | ||
container_name: ctrlpanel_redis | ||
restart: unless-stopped | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- laravel | ||
- ctrlpanel | ||
|
||
networks: | ||
laravel: | ||
ctrlpanel: |
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 |
---|---|---|
@@ -1,15 +1,62 @@ | ||
version: '3' | ||
|
||
services: | ||
controlpanel_standalone: | ||
build: | ||
context: ../../ | ||
dockerfile: ./docker/standalone/Dockerfile | ||
container_name: controlpanel_standalone | ||
restart: on-failure | ||
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: | ||
- './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' | ||
- './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: |
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
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