mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 05:25:36 +07:00
3.1 KiB
3.1 KiB
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:
VERSION=latest
CONTAINER_NAME=mivo
HOST_IP=0.0.0.0
APP_PORT=8085
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 (default8080).TZ: Your timezone (e.g.,Asia/Jakarta).
2. Create Project in aaPanel
- Login to your aaPanel dashboard.
- Navigate to Docker > Project.
- Click Add Project.
- Fill in the details:
- Name:
mivo(or your preferred name) - Path: This will auto-fill (usually
/www/dk_project/mivo). UpdateAPP_PATHin your .env to match this! - Compose Template: Paste the following YAML content:
- Name:
version: '3.8'
services:
mivo:
image: ghcr.io/mivodev/mivo:${VERSION:-latest}
container_name: ${CONTAINER_NAME:-mivo}
restart: unless-stopped
ports:
- "${HOST_IP:-0.0.0.0}:${APP_PORT:-8085}: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:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- TZ=${TZ:-Asia/Jakarta}
deploy:
resources:
limits:
cpus: '${CPUS:-1.0}'
memory: ${MEMORY_LIMIT:-512M}
networks:
- mivo_net
networks:
mivo_net:
driver: bridge
- Wait! Before clicking "Confirm" or "Add":
- Look for the .env config section (usually a tab or sidebar in the Add Project modal).
- Paste your
.envcontent there.
- 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):
- Go to Website > Add Site.
- Enter your domain name.
- For PHP Version, select Reverse Proxy (or create as Static and set up proxy later).
- After creation, open the site settings > Reverse Proxy > Add Reverse Proxy.
- Target URL:
http://127.0.0.1:8085(Replace8085with yourAPP_PORT). - Save and secure with SSL.