feat: add aaPanel Docker deployment support and documentation

This commit is contained in:
dyzulk
2026-01-17 03:03:23 +07:00
parent 6eb6bbb359
commit ae65ab30fa
6 changed files with 287 additions and 0 deletions

View File

@@ -57,6 +57,37 @@ services:
- `edge`: Bleeding edge build from the `main` branch.
- `v1.x.x`: Specific released versions.
## Deploy on aaPanel (Advanced / Native Style)
This method follows the standard aaPanel "Quick Install" pattern, using full control over paths and resources via a `.env` file.
1. **Prepare Files**:
* Copy the content of [docker/aapanel-template.yml](docker/aapanel-template.yml).
* Copy the content of [docker/aapanel-env.example](docker/aapanel-env.example).
2. **Add Project in aaPanel**:
* Go to **Docker** -> **Project** -> **Add Project**.
* **Name**: `mivo`
* **Compose Template**: Paste the content of `aapanel-template.yml`.
3. **Define Configuration (.env)**:
* In the sidebar or tab for **.env** (which appears after you paste the template in some versions, or you create manually):
* Paste the content of `aapanel-env.example`.
* **Crucial Step**: Edit `APP_PATH` to match your project path (usually `/www/dk_project/mivo`).
* Adjust `APP_PORT` if needed.
4. **Confirm**: Click "Add" or "Confirm" to deploy.
5. **Setup Reverse Proxy**:
* Go to **Website** -> **Add Site** -> **Reverse Proxy**.
* Target: `http://127.0.0.1:8080` (Usage of variable `${APP_PORT}` matches this).
* Go to **Website** -> **Add Site**.
* Enter your domain name (e.g., `mivo.yourdomain.com`).
* Select **Reverse Proxy** as the PHP version (or set it up manually afterwards).
* After the site is created, click on it -> **Reverse Proxy** -> **Add Reverse Proxy**.
* **Target URL**: `http://127.0.0.1:8080` (or the port you configured).
* Save and enable SSL.
## Environment Variables
| Variable | Description | Default |

View File

@@ -0,0 +1,10 @@
VERSION=latest
CONTAINER_NAME=mivo
HOST_IP=0.0.0.0
APP_PORT=8080
APP_PATH=/www/dk_project/mivo
APP_ENV=production
APP_DEBUG=false
TZ=Asia/Jakarta
CPUS=1.0
MEMORY_LIMIT=512M

View File

@@ -0,0 +1,36 @@
version: '3.8'
services:
mivo:
image: dyzulk/mivo:${VERSION}
container_name: ${CONTAINER_NAME}
restart: unless-stopped
ports:
- "${HOST_IP}:${APP_PORT}:80"
volumes:
# Database & Sessions
- ${APP_PATH}/mivo_data:/var/www/html/app/Database
# Custom Logos
- ${APP_PATH}/mivo_logos:/var/www/html/public/assets/img/logos
# Environment file (Optional - mapped from host)
# - ${APP_PATH}/.env:/var/www/html/.env
environment:
- APP_ENV=${APP_ENV}
- APP_DEBUG=${APP_DEBUG}
- TZ=${TZ}
deploy:
resources:
limits:
cpus: '${CPUS}'
memory: ${MEMORY_LIMIT}
networks:
- mivo_net
networks:
mivo_net:
driver: bridge

View File

@@ -17,6 +17,7 @@ export const sidebarEn: DefaultTheme.Sidebar = {
collapsed: false,
items: [
{ text: 'Docker', link: '/guide/docker' },
{ text: 'aaPanel (Docker)', link: '/guide/docker-aapanel' },
{ text: 'Web Server', link: '/guide/installation#web-servers' },
{ text: 'Shared Hosting', link: '/guide/installation#shared-hosting' },
{ text: 'VPS & Cloud', link: '/guide/installation#vps-cloud' },
@@ -88,6 +89,7 @@ export const sidebarId: DefaultTheme.Sidebar = {
collapsed: false,
items: [
{ text: 'Docker', link: '/id/guide/docker' },
{ text: 'aaPanel (Docker)', link: '/id/guide/docker-aapanel' },
{ text: 'Web Server', link: '/id/guide/installation#web-server' },
{ text: 'Shared Hosting', link: '/id/guide/installation#shared-hosting' },
{ text: 'VPS & Cloud', link: '/id/guide/installation#vps-cloud' },

View File

@@ -0,0 +1,104 @@
# Deploy on aaPanel (Docker)
aaPanel makes it easiest to manage Docker projects using its native **Docker Manager** module. We recommend following the standard "Quick Install" pattern which uses environment variables for better maintainability.
::: tip PREREQUISITES
Ensure you have the **Docker** module installed from the aaPanel App Store.
:::
## 1. Prepare Configuration
We use a "Native aaPanel Style" setup where configuration is separated from the template.
**Environment File (`.env`)**
Create a new file named `.env` and configure your preferences:
```ini
VERSION=latest
CONTAINER_NAME=mivo
HOST_IP=0.0.0.0
APP_PORT=8080
APP_PATH=/www/dk_project/mivo
APP_ENV=production
APP_DEBUG=false
TZ=Asia/Jakarta
CPUS=1.0
MEMORY_LIMIT=512M
```
**Attribute Explanation:**
- `APP_PATH`: **Crucial**. This must match your project directory in aaPanel (default is `/www/dk_project/<project_name>`).
- `APP_PORT`: The port you want to expose (default `8080`).
- `TZ`: Your timezone (e.g., `Asia/Jakarta`).
## 2. Create Project in aaPanel
1. Login to your aaPanel dashboard.
2. Navigate to **Docker** > **Project**.
3. Click **Add Project**.
4. Fill in the details:
- **Name**: `mivo` (or your preferred name)
- **Path**: This will auto-fill (usually `/www/dk_project/mivo`). **Update `APP_PATH` in your .env to match this!**
- **Compose Template**: Paste the following YAML content:
```yaml
version: '3.8'
services:
mivo:
image: dyzulk/mivo:${VERSION}
container_name: ${CONTAINER_NAME}
restart: unless-stopped
ports:
- "${HOST_IP}:${APP_PORT}:80"
volumes:
# Database & Sessions
- ${APP_PATH}/mivo_data:/var/www/html/app/Database
# Custom Logos
- ${APP_PATH}/mivo_logos:/var/www/html/public/assets/img/logos
# Environment file (Optional - mapped from host)
# - ${APP_PATH}/.env:/var/www/html/.env
environment:
- APP_ENV=${APP_ENV}
- APP_DEBUG=${APP_DEBUG}
- TZ=${TZ}
deploy:
resources:
limits:
cpus: '${CPUS}'
memory: ${MEMORY_LIMIT}
networks:
- mivo_net
networks:
mivo_net:
driver: bridge
```
5. **Wait!** Before clicking "Confirm" or "Add":
- Look for the **.env** config section (usually a tab or sidebar in the Add Project modal).
- Paste your `.env` content there.
6. Click **Confirm** to deploy.
## 3. Verify Deployment
aaPanel will pull the image and start the container. Once running:
- **Database Location**: Your data is safe at `/www/dk_project/mivo/mivo_data`.
- **Logos Location**: Upload custom logos to `/www/dk_project/mivo/mivo_logos`.
## 4. Setup Domain (Reverse Proxy)
To access MIVO via a domain (e.g., `mivo.yourdomain.com`):
1. Go to **Website** > **Add Site**.
2. Enter your domain name.
3. For **PHP Version**, select **Reverse Proxy** (or create as Static and set up proxy later).
4. After creation, open the site settings > **Reverse Proxy** > **Add Reverse Proxy**.
5. **Target URL**: `http://127.0.0.1:8080` (Replace `8080` with your `APP_PORT`).
6. Save and secure with SSL.

View File

@@ -0,0 +1,104 @@
# Deploy di aaPanel (Docker)
aaPanel adalah salah satu panel hosting paling populer yang memiliki modul **Docker Manager** yang sangat memudahkan manajemen container. Kami merekomendasikan penggunaan gaya "Native" aaPanel agar manajemen resource dan env lebih rapi.
::: tip PRASYARAT
Pastikan Anda sudah menginstall modul **Docker** dari App Store di dalam aaPanel Anda.
:::
## 1. Siapkan Konfigurasi
Metode ini memisahkan konfigurasi (di file `.env`) dari template logic, sehingga Anda bisa dengan mudah mengubah port atau resource limit tanpa mengedit file YAML yang rumit.
**File Environment (`.env`)**
Buat file baru bernama `.env` (atau simpan teks ini untuk nanti):
```ini
VERSION=latest
CONTAINER_NAME=mivo
HOST_IP=0.0.0.0
APP_PORT=8080
APP_PATH=/www/dk_project/mivo
APP_ENV=production
APP_DEBUG=false
TZ=Asia/Jakarta
CPUS=1.0
MEMORY_LIMIT=512M
```
**Penjelasan Atribut:**
- `APP_PATH`: **Penting**. Ini harus sama persis dengan lokasi project di aaPanel Anda (defaultnya `/www/dk_project/<nama_project>`).
- `APP_PORT`: Port host yang ingin dibuka (default `8080`).
- `CPUS` & `MEMORY_LIMIT`: Batasan resource agar container tidak membebani server/VPS Anda.
## 2. Buat Project di aaPanel
1. Login ke dashboard aaPanel.
2. Masuk ke menu **Docker** > **Project** (atau **Compose** di versi lama).
3. Klik tombol **Add Project**.
4. Isi form sebagai berikut:
- **Name**: `mivo` (atau nama lain yang Anda suka)
- **Path**: Perhatikan path yang muncul otomatis (biasanya `/www/dk_project/mivo`). **Pastikan `APP_PATH` di .env Anda sesuai dengan path ini!**
- **Compose Template**: Copy-paste kode YAML berikut:
```yaml
version: '3.8'
services:
mivo:
image: dyzulk/mivo:${VERSION}
container_name: ${CONTAINER_NAME}
restart: unless-stopped
ports:
- "${HOST_IP}:${APP_PORT}:80"
volumes:
# Database & Sessions
- ${APP_PATH}/mivo_data:/var/www/html/app/Database
# Custom Logos
- ${APP_PATH}/mivo_logos:/var/www/html/public/assets/img/logos
# Environment file (Optional - mapped from host)
# - ${APP_PATH}/.env:/var/www/html/.env
environment:
- APP_ENV=${APP_ENV}
- APP_DEBUG=${APP_DEBUG}
- TZ=${TZ}
deploy:
resources:
limits:
cpus: '${CPUS}'
memory: ${MEMORY_LIMIT}
networks:
- mivo_net
networks:
mivo_net:
driver: bridge
```
5. **Tunggu!** Sebelum klik "Confirm":
- Cari bagian konfigurasi **.env** (biasanya berupa tab atau input area di samping/bawah editor YAML).
- Paste konten `.env` yang sudah Anda siapkan di langkah 1 ke sana.
6. Klik **Confirm** untuk memulai deployment.
## 3. Verifikasi Deployment
aaPanel akan otomatis mendownload image dan menjalankan container.
- **Lokasi Data**: Database Anda aman tersimpan di `/www/dk_project/mivo/mivo_data`. folder ini tidak akan hilang walau container dihapus.
- **Lokasi Logo**: Upload logo kustom Anda ke `/www/dk_project/mivo/mivo_logos`.
## 4. Setup Domain (Reverse Proxy)
Agar MIVO bisa diakses menggunakan domain (contoh: `mivo.domainanda.com`):
1. Ke menu **Website** > **Add Site**.
2. Masukkan nama domain Anda.
3. Pada **PHP Version**, pilih **Static** (atau langsung Reverse Proxy jika ada opsinya).
4. Setelah site dibuat, buka settingannya > **Reverse Proxy** > **Add Reverse Proxy**.
5. **Target URL**: `http://127.0.0.1:8080` (Ganti `8080` sesuai dengan `APP_PORT` Anda).
6. Simpan dan aktifkan SSL agar lebih aman.