Merchant & operations
Docker Compose
Run Agovena with Docker Compose, including the web container, database, worker and scheduler.
On this page
Docker Compose runs the Agovena application, web container, MariaDB, Redis, queue worker and scheduler together. Use this guide instead of the native Linux steps. The web service includes Nginx for the container network.
1. Install Docker
Install Docker Engine and the Docker Compose plugin using the official instructions for your operating system. Confirm that both commands work:
docker --version
docker compose version
2. Get the Core checkout
Clone the Core repository on the host that will run the stack:
sudo git clone --depth 1 --branch main https://github.com/milovd/Agovena.git /opt/agovena
sudo chown -R "$USER":"$USER" /opt/agovena
cd /opt/agovena
For a later source update, pull the latest revision with:
git pull --ff-only origin main
The Compose build creates the PHP-FPM application image. You do not need a native PHP-FPM or MariaDB installation on the host.
3. Configure Compose variables
Create the application .env and the Compose variables together:
cd /opt/agovena
cp .env.example .env
nano .env
Set these values:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://store.example
AGOVENA_DB_PASSWORD=[REDACTED]
AGOVENA_DB_ROOT_PASSWORD=[REDACTED]
Use separate strong passwords and keep this file out of Git and support output. The Compose file uses the two AGOVENA_* variables for MariaDB and injects the internal database and Redis hosts into the application, worker and scheduler containers.
4. Start the stack
Start every service. This starts the web container, application, database, Redis, worker and scheduler:
docker compose -f docker-compose.prod.yml up -d --build
The web service listens on host port 8080. Keep the named MariaDB and Redis volumes. Do not publish the application container directly when the store is public; put HTTPS in front of the web service.
5. Install Agovena
Run the database migrations, create the public storage link and start the installer in the app container:
docker compose -f docker-compose.prod.yml exec app php artisan key:generate
docker compose -f docker-compose.prod.yml exec app php artisan migrate --force
docker compose -f docker-compose.prod.yml exec app php artisan storage:link
docker compose -f docker-compose.prod.yml exec app php artisan agovena:install
The installer asks for the owner, store name, language, timezone, currency and theme. An installed store must not be installed a second time.
6. Check the Compose services
Check service state and application health:
docker compose -f docker-compose.prod.yml ps
docker compose -f docker-compose.prod.yml logs --tail=50 app worker scheduler
docker compose -f docker-compose.prod.yml exec app php artisan agovena:doctor
The worker service runs queue:work. The scheduler service runs schedule:work. Do not add a host cronjob for this scheduler. Keep both services running after restarts.
7. Publish the store
Put a TLS reverse proxy in front of the web service and forward traffic to host port 8080. Set APP_URL to the public HTTPS address. The container configuration is docker/nginx/default.conf; it is separate from the native Nginx guide.
Check the storefront, /login, /admin, public media and a Laravel route before accepting credentials.
8. Update the Compose stack
Back up MariaDB, .env, public media, private files and installed packages before an update. Pull the newest source and rebuild the services:
cd /opt/agovena
git pull --ff-only origin main
docker compose -f docker-compose.prod.yml up -d --build
docker compose -f docker-compose.prod.yml exec app php artisan agovena:upgrade
docker compose -f docker-compose.prod.yml exec app php artisan agovena:doctor
Keep the named volumes. Do not run migrate:fresh or remove volumes on an installed store. The worker and scheduler services use the rebuilt application image after Compose recreates them.