Deploying AppleAutoPro Frontend and Backend with Docker Compose
🌟 Introduction
This tutorial will guide you through deploying the AppleAutoPro frontend and backend components quickly using Docker Compose.
🛠️ 1. Server Preparation
Using the aaPanel (Optional): If you need to manage multiple sites or services, it is recommended to install aaPanel and Nginx to simplify management.
📥 2. Download and Install
2.1 Choose the Installation Script Based on Server Location
Personal Edition Installation Command
bash <(curl -Ls https://raw.githubusercontent.com/SideCloudGroup/AppleAutoPro-Personal/refs/heads/v4/install_en.sh)
Business Edition Installation Command
bash <(curl -Ls https://raw.githubusercontent.com/SideCloudGroup/AppleAutoPro-Business/refs/heads/v4/install_en.sh)
⚙️ 3. Modify Configuration Files
3.1 Directory Structure Overview
data
Directory: Stores program data files (e.g., databases). Regular backups are recommended.web
Directory: Stores frontend files.
3.2 Edit .env
File
Fill in the necessary configuration information in the .env
file:
- It is recommended to use strong random passwords for
MARIADB_ROOT_PASSWORD
andMARIADB_PASSWORD
to enhance security.
Other site settings can be configured via the admin panel after the program starts.
🌐 4. Configure Reverse Proxy
The program listens on port 18523
by default. Set up a reverse proxy to: http://localhost:18523
. This port can be changed by editing the WEB_PORT
field in the .env
file.
💻 aaPanel Configuration Example
- Create a new site in the aaPanel, set the domain, and select
Static
for thePHP version
. - Go to site settings, find
Reverse Proxy
, and add the following rule:- Proxy Target:
http://localhost:18523
- Domain:
$host
- Proxy Target:
- Example configuration screenshot:
🚀 Caddy Reverse Proxy Configuration Example
- Open the
docker-compose.yml
file and uncomment thecaddy
service while commenting out thenginx
service as follows:
caddy:
image: caddy:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./data/Caddyfile:/etc/caddy/Caddyfile
- ./data/caddy/data:/data
- ./data/caddy:/config
- ./web:/var/www/html
depends_on:
php-fpm:
condition: service_healthy
networks:
- appleautopro-network
restart: always
# nginx:
# image: nginx:latest
# ports:
# - "127.0.0.1:${WEB_PORT}:80"
# - "[::1]:${WEB_PORT}:80"
# volumes:
# - ./data/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# - ./web:/var/www/html
# depends_on:
# php-fpm:
# condition: service_healthy
# networks:
# - appleautopro-network
# restart: always
- Open the
data/Caddyfile
file and fill in your email (for automatic SSL configuration) and domain.
🚀 5. Start the Service
Run the following command in the installation directory to start Docker containers:
docker compose up -d
Check if the containers are running properly:
docker compose ps -a
🧑💻 6. Register Administrator Account
Run the following command to register an administrator account (adjust the container name as needed):
docker exec -it appleautopro-php-fpm-1 php think register <email> <username> <password>
⚠️ Note: Angle brackets (<>
) indicate placeholders; do not include them in actual commands.
✅ 7. Log In and Complete Configuration
- Log in to the admin panel using the newly created administrator account.
- Go to
Admin Panel
→System Settings
to complete basic site settings. - Before adding user accounts, complete the WebDriver Deployment for full functionality.
🎉 Congratulations! AppleAutoPro has been successfully deployed!