Production Deployment Guide
This guide outlines the steps for deploying the License Plate Recognition System in a production environment.
1. Prerequisites
- A server or cluster with Docker and Docker Compose installed.
- A Docker registry containing the images for all the services. See the Building and Pushing Docker Images guide for more information.
- A PostgreSQL database. You can run the database in a Docker container, as shown in the
docker-compose.prod.yamlfile, or use a managed database service.
2. Configuration
Create a .env file on the production server with the appropriate environment variables for your production environment. You can refer to the Configuration guide for a complete list of variables.
Important: Do not use the default development passwords...
3. Docker Compose for Production
The docker-compose.prod.yaml file is provided as a starting point for production deployments. This file is similar to the dev version, but it uses the images from the Docker registry instead of building them locally, and it does not mount the source code volumes.
You can use this file directly or adapt it to your needs. If for example you wanted to use k8s.
4. Deployment Steps
- Copy
docker-compose.prod.yamlto the server: Transfer thedocker-compose.prod.yamlfile to your production server. - Create the
.envfile: Create a.envfile on the server with your production configuration. - Log in to the Docker registry: If your Docker registry requires authentication (the default one does not), log in using the
docker logincommand. -
Start the application: Use Docker Compose to start the application in detached mode:
This will pull the required images from your Docker registry and start all the services.