mcaptcha-website/docs/self-hosted/index.xml
2022-11-06 11:59:10 +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>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:
1sudo apt install postgres 2. Create new user for running mcaptcha 1$ sudo useradd -b /srv -m -s /usr/bin/zsh mcaptcha 3. Create new user in Postgres 1$ sudo -iu postgres # switch to `postgres` user 2$ psql 3postgres=# CREATE USER mcaptcha WITH PASSWORD &amp;#39;my super long password and yes you need single quote`; 4$ createdb -O mcaptcha mcaptcha # create db &amp;#39;mcaptcha&amp;#39; with &amp;#39;mcaptcha&amp;#39; as owner 4.</description></item><item><title>Using 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>With 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:
1docker run -p &amp;lt;host-machine-port&amp;gt;:&amp;lt;port-in-configuration-file&amp;gt; \ 2 --add-host=database:&amp;lt;database-ip-addrss&amp;gt; \ 3 -e RUST_LOG=debug \ 4 -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; \ 5 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>Database 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>