Docker Installation
The recommended way to install Auto Commerce is using Docker, which ensures consistent environments and quick setup.
Prerequisites
- Docker Engine 20.10+
- Docker Compose 2.0+
- Git
Step 1: Clone the Repository
git clone https://github.com/your-org/autocom.git
cd autocom
Step 2: Configure Environment
Copy the example environment files and configure them:
# Backend environment
cp backend/.env.example backend/.env
# Frontend environment
cp frontend/.env.example frontend/.env
Edit backend/.env with your settings:
APP_URL=http://localhost:8000
APP_KEY=base64:... # Will be generated
# Database
DB_CONNECTION=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_DATABASE=autocom
DB_USERNAME=autocom
DB_PASSWORD=secret
# Redis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
Edit frontend/.env:
NEXT_PUBLIC_API_URL=http://localhost:8000
Step 3: Start Docker Containers
For development:
docker compose up -d
For production:
docker compose -f docker-compose.prod.yml up -d
This starts the following services:
- app: Laravel API server (port 8000)
- frontend: Next.js application (port 3000)
- postgres: PostgreSQL database
- redis: Redis for caching and queues
- horizon: Laravel Horizon for job processing
Step 4: Generate Application Key
docker compose exec app php artisan key:generate
Step 5: Access Installation Wizard
Open your browser and navigate to:
- Development:
http://localhost:3000 - Production: Your configured domain
You will be automatically redirected to the Installation Wizard. Follow the wizard guide to complete setup.
Docker Commands Reference
# View logs
docker compose logs -f
# Stop containers
docker compose down
# Rebuild containers
docker compose build --no-cache
# Execute commands in app container
docker compose exec app php artisan <command>
# Access app shell
docker compose exec app bash
Updating
To update Auto Commerce:
# Pull latest changes
git pull origin main
# Rebuild and restart
docker compose build
docker compose up -d
# Run migrations
docker compose exec app php artisan migrate --force
Next Steps
- Installation Wizard - Complete the guided setup
- Troubleshooting - Common issues and solutions