This repository contains the configuration and setup for an HAProxy service used to manage traffic for various applications and services. The HAProxy instance is configured to handle HTTP, HTTPS, and PostgreSQL traffic.
docker-compose.yaml: Defines the Docker Compose configuration for running the HAProxy container.haproxy.cfg: The main configuration file for HAProxy, defining frontends, backends, and ACLs.env-template: Environment variables template file, containing sensitive information like the database server address. This file is ignored by.gitignore.ssl/: Directory for SSL certificates and keys. Contains aREADME.mdwith instructions for adding.pemfiles.equitytool.austinmobility.io.pem: Example SSL certificate and key file.
.dockerignore: Specifies files and directories to exclude from Docker builds. This file is a symlink of.gitignore..gitignore: Specifies files and directories to exclude from version control.
- Docker and Docker Compose installed on your system.
- SSL certificates in
.pemformat placed in thessl/directory. - A valid
envfile with the required environment variable.
-
Clone the repository:
git clone <repository-url> cd dts-services-haproxy
-
Add your SSL certificates to the
ssl/directory. Ensure they are named as<fully qualified domain name>.pem. -
Create an
envfile in the root directory with the following content:DATABASE_SERVER=<your-database-server>
-
Start the HAProxy service using Docker Compose:
docker compose up -d
-
Watch the logs if needed:
docker compose logs -f
- HAProxy Configuration: Modify
haproxy.cfgto update frontends, backends, and ACLs as needed. - Environment Variables: Update the
envfile to point to the correct database server. - SSL Certificates: Place
.pemfiles in thessl/directory for SSL termination.
- The
ssl/README.mdfile serves as a placeholder and should be removed before running the container. - The
envfile is ignored by version control for security reasons but is required, so please fill it out.
This code is licensed under the Unlicense. Please see: https://unlicense.org/.