feat: document docker-compose deployment using dotenv file

This commit is contained in:
Aravinth Manivannan 2024-01-08 00:32:17 +05:30
parent 457ec237d2
commit cf24b937e4
Signed by untrusted user: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -33,7 +33,7 @@ for configurable options.
If you have already have a Postgres instance running, then:
```bash
```
docker run -p <host-machine-port>:<port-in-configuration-file> \
--add-host=database:<database-ip-addrss> \
-e RUST_LOG=debug \
@ -42,18 +42,26 @@ docker run -p <host-machine-port>:<port-in-configuration-file> \
```
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).