Skip to main content
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:
  1. Copy the Docker environment example file:
  1. 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:
  1. Environment Variables: Ensure all production environment variables are set securely
  2. Database Migrations: Run migrations before starting the application
  3. Health Checks: Add health check endpoints to monitor your application
  4. Logging: Configure proper logging for production

CI/CD Pipeline

You can integrate Docker deployments into your CI/CD pipeline:
  1. Build and test the Docker image
  2. Push the image to a container registry
  3. Deploy the new image to your production environment

Scaling with Docker

For scaling your application:
  1. Horizontal Scaling: Run multiple instances of your container
  2. Load Balancing: Use a load balancer to distribute traffic
  3. Container Orchestration: Consider using Kubernetes for larger deployments

Next Steps

Environment Variables

Learn about all available configuration options

Security

Security best practices for your deployment