From cf24b937e44d5c1c0d4b9fcf6527b531b3e38d59 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Mon, 8 Jan 2024 00:32:17 +0530 Subject: [PATCH] feat: document docker-compose deployment using dotenv file --- content/docs/self-hosting/docker.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/content/docs/self-hosting/docker.md b/content/docs/self-hosting/docker.md index a21845f..e55fa65 100644 --- a/content/docs/self-hosting/docker.md +++ b/content/docs/self-hosting/docker.md @@ -33,7 +33,7 @@ for configurable options. If you have already have a Postgres instance running, then: -```bash +``` docker run -p : \ --add-host=database: \ -e RUST_LOG=debug \ @@ -42,18 +42,26 @@ docker run -p : \ ``` If you don't have a Postgres instance running, you can either install -one using a package manager or launch one with docker. A [docker-compose -configuration]('../docker-compose.yml) is available that will launch both -a database instance mcaptcha instance. +one using a package manager or launch one with docker. ## With docker-compose -1. Follow steps above to build docker image. +1. Download docker-compose file and the configuration file: -2. Set database password [docker-compose configuration]('../docker-compose.yml). +``` +wget https://raw.githubusercontent.com/mCaptcha/mCaptcha/master/.env.docker-compose +wget https://raw.githubusercontent.com/mCaptcha/mCaptcha/master/docker-compose.yml +``` -3. Launch network +2. Configure deployment using `.env.docker-compose` environment variable + file -```bash +3. Launch containers: + +``` docker-compose up -d ``` + +4. Configure SSL using reverse proxy: mCaptcha doesn't support SSL at + the moment, so please use a reverse proxy to secure your instance. A + reference nginx virtual host configuration file is available [here](../bare-metal/#6-install-and-configure-nginx).