Docker
Deploy your project on your own infrastructure with Docker
Building the Docker Image
Build your application's Docker image using the following command:
Running the Container
Run the container with basic configuration:
Production Deployment with Docker Compose
Below is a complete example using Docker Compose with Traefik as a reverse proxy, featuring:
- Automatic SSL certificate management
- PostgreSQL database
- Secure HTTPS redirection
- Container health checks
Environment Variables
Create a .env
file in your project root with these required variables:
Deployment Steps
- Install Docker and Docker Compose on your server
- Copy the
docker-compose.yml
and.env
files to your server - Create required directories:
- Start the services:
Troubleshooting
If you encounter issues:
- Check container logs:
docker compose logs -f [service-name]
- Verify environment variables are set correctly
- Ensure all required ports are accessible
- Check your domain's DNS configuration points to your server