1
0
Fork 0
forked from mCaptcha/website
mcaptcha-website/docs/self-hosted/index.xml
2021-07-21 10:21:00 +00:00

11 lines
No EOL
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>self-hosted on</title><link>/docs/self-hosted/</link><description>Recent content in self-hosted on</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><atom:link href="/docs/self-hosted/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting started</title><link>/docs/self-hosted/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/self-hosted/getting-started/</guid><description>Get started There are two main ways to self-host mCaptcha:
Bare metal With Docker</description></item><item><title>Docker</title><link>/docs/self-hosted/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/self-hosted/docker/</guid><description>Docker 1. Configure mcaptcha is highly configurable.
Configuration is applied/merged in the following order:
path to configuration file passed in via MCAPTCHA_CONFIG ./config/default.toml /etc/mcaptcha/config.toml environment variables. See CONFIGURATION.md for configurable options.
2. Run image If you have already have a Postgres instance running, then:
docker run -p &amp;lt;host-machine-port&amp;gt;:&amp;lt;port-in-configuration-file&amp;gt; \ --add-host=database:&amp;lt;database-ip-addrss&amp;gt; \ -e RUST_LOG=debug \ -e DATABASE_URL=&amp;#34;postgres://&amp;lt;db-user&amp;gt;:&amp;lt;db-password&amp;gt;@database:&amp;lt;db-port&amp;gt;/&amp;lt;db-name&amp;gt;&amp;#34; \ mcaptcha/mcaptcha:latest If you don&amp;rsquo;t have a Postgres instance running, you can either install one using a package manager or launch one with docker.</description></item><item><title>Deploy bare metal</title><link>/docs/self-hosted/bare-metal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/self-hosted/bare-metal/</guid><description>2. Configure mcaptcha is highly configurable.
Configuration is applied/merged in the following order:
path to configuration file passed in via MCAPTCHA_CONFIG ./config/default.toml /etc/mcaptcha/config.toml environment variables. 1. Install postgres if you don&amp;rsquo;t have it already. For Debian based distributions:
sudo apt install postgres 2. Create new user for running mcaptcha $ sudo useradd -b /srv -m -s /usr/bin/zsh mcaptcha 3. Create new user in Postgres $ sudo -iu postgres # switch to `postgres` user $ psql postgres=# CREATE USER mcaptcha WITH PASSWORD &amp;#39;my super long password and yes you need single quote`; $ createdb -O mcaptcha mcaptcha # create db &amp;#39;mcaptcha&amp;#39; with &amp;#39;mcaptcha&amp;#39; as owner 4.</description></item><item><title>Databse and cache</title><link>/docs/self-hosted/dependencies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/self-hosted/dependencies/</guid><description>Notes Database Database migrations are baked into the server binary so don&amp;rsquo;t worry about them.
When compiling from source, unset database configuration(comment out database configuration/ unset relevant environment variables). mCaptcha uses sqlx database client library which checks SQL queries at compile time. So if you are starting with a fresh database without migrations applied, compilation will fail.
Redis Redis is an optional dependency.</description></item></channel></rss>