AIGO - Docker Deployment
Project Structure
Build Stages
| Stage |
Image |
Purpose |
composer |
composer:2.7 |
composer install --no-dev |
npm |
node:20-slim |
npm ci && npm run build (compiles VITE_* vars into JS) |
runtime |
php:8.2-apache |
Apache + PHP with mod_rewrite, pdo_mysql, redis |
Deploy to Coolify
- Push this repo to GitHub/GitLab
- In Coolify, create a new project → select your repo
- Coolify auto-detects
docker-compose.yml
- Set these environment variables in Coolify's UI:
Required
| Variable |
Description |
How to get it |
APP_URL |
Your domain |
https://your-domain.com |
APP_KEY |
Laravel encryption key |
Run php artisan key:generate --show locally |
DB_PASSWORD |
MySQL user password |
Choose a secure password |
DB_ROOT_PASSWORD |
MySQL root password |
Choose a secure password |
WebSocket (Reverb)
| Variable |
Description |
Example |
VITE_REVERB_HOST |
Your Coolify domain |
your-domain.com |
VITE_REVERB_PORT |
WebSocket port |
8080 |
VITE_REVERB_SCHEME |
https if Traefik handles TLS |
https |
These VITE_* vars are build args — they get compiled into the JS bundle. To change them, update the env var in Coolify and rebuild.
Optional
| Variable |
Default |
STRAVA_CLIENT_ID |
124405 |
STRAVA_CLIENT_SECRET |
(leave blank if not used) |
REVERB_APP_ID |
103594 |
REVERB_APP_KEY |
zlno4t94kysjzmtwlmux |
REVERB_APP_SECRET |
7zpl1vq4qvvotvrodq2u |
- In the reverb service settings, expose port 8080 via Traefik
- Deploy — MySQL auto-imports
humicpro_aigo.sql on first startup
Architecture
Services
| Service |
Image |
Purpose |
app |
Built from Dockerfile |
Apache + PHP-FPM, serves the Laravel app |
reverb |
Same image |
Runs php artisan reverb:start for real-time WebSocket |
queue |
Same image |
Runs php artisan queue:work for background jobs |
db |
mysql:8.0 |
MySQL database with auto-import of SQL dump |
Maintenance
- Storage: Persistent volume
aigo-storage at /var/www/aigo/storage
- Database: Persistent volume
dbdata at /var/lib/mysql
- Logs: Available via
docker compose logs -f [service]
- To change domain: Update
APP_URL + VITE_REVERB_HOST in Coolify, rebuild