Development
Docker Deployment
Deploy ProStack using Docker for consistent environments
ProStack includes Docker support for containerized deployment, ensuring consistent environments across development and production.
Docker Setup
ProStack comes with a pre-configured Dockerfile in the root directory:
Docker Environment Variables
For Docker deployments, ProStack provides a separate environment file:
- Copy the Docker environment example file:
- Update the variables in
.env.docker
:
Building the Docker Image
To build the Docker image:
Running the Docker Container
To run the application in a Docker container:
Docker Compose Setup
For a more complete setup with a database, you can use Docker Compose:
Save this as docker-compose.yml
in your project root, then run:
Production Deployment Considerations
When deploying to production with Docker, consider the following:
- Environment Variables: Ensure all production environment variables are set securely
- Database Migrations: Run migrations before starting the application
- Health Checks: Add health check endpoints to monitor your application
- Logging: Configure proper logging for production
CI/CD Pipeline
You can integrate Docker deployments into your CI/CD pipeline:
- Build and test the Docker image
- Push the image to a container registry
- Deploy the new image to your production environment
Scaling with Docker
For scaling your application:
- Horizontal Scaling: Run multiple instances of your container
- Load Balancing: Use a load balancer to distribute traffic
- Container Orchestration: Consider using Kubernetes for larger deployments
Next Steps
Was this page helpful?