Nette Staging Deployment
This directory contains tools and templates for deploying Nette PHP applications to staging environments using Docker Swarm and Traefik.
Features
- Automated Docker configuration generation
- PHP version detection from ddev configuration
- Optional database support (MySQL/PostgreSQL)
- Frontend build detection and integration
- Composer dependency management
- Traefik routing with SSL termination
- GitLab CI/CD pipeline integration
- Docker Swarm cluster
- Traefik reverse proxy
- GitLab CI/CD (optional)
- Domain configured for wildcard SSL
- MySQL 8.0
- PostgreSQL 15
Usage
1. Navigate to your Nette project directory
2. Run the installer:
``
bash
bash /path/to/stage-tools/nette/default/v1.0/install.sh
`
3. Follow the interactive prompts to configure your deployment
Generated Files
Dockerfile.stage - Docker configuration for production
docker-compose.stage.yml - Docker Swarm deployment configuration
.gitlab-ci.yml - GitLab CI/CD pipeline
.env.example - Environment variables template
config.yaml` - Nette configuration for stagingRequirements
Database Support
The installer can configure optional database services:
Database configuration is automatically generated based on your selections.
Frontend Integration
If a frontend build process is detected (package.json with build script), the Docker configuration will include Node.js for building assets.