-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontainerization.html
More file actions
33 lines (33 loc) · 20.8 KB
/
containerization.html
File metadata and controls
33 lines (33 loc) · 20.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html><html data-current="page" lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Containerization</title><meta name="description" content="GLAuth Documentation"><link rel="stylesheet" href="/assets/style.css?v=1667109529294"><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💥</text></svg>"><script defer="defer">function logout(){localStorage.removeItem("passphrase"),window.location.href="/"}function showNavigation(){const e=document.getElementById("navigation");e.classList.remove("hidden","sticky","pt-32"),e.classList.add("absolute","right-0","top-0","-mt-0","z-50","pt-0","bg-white","border-l","border-gray-200")}function closeNavigation(){const e=document.getElementById("navigation");e.classList.add("hidden"),e.classList.remove("absolute","right-0","z-50","bg-gray-100","border-r","border-gray-800")}function activateDarkMode(){"true"===localStorage.getItem("darkmode")?(localStorage.setItem("darkmode","false"),document.body.classList.remove("dark")):(localStorage.setItem("darkmode","true"),document.body.classList.add("dark"))}function toggleLayout(e){"horizontal"===localStorage.getItem("layout")?localStorage.setItem("layout","vertical"):"vertical"===localStorage.getItem("layout")?localStorage.setItem("layout","horizontal"):localStorage.getItem("layout")||("horizontal"===e?localStorage.setItem("layout","vertical"):localStorage.setItem("layout","horizontal")),console.log(localStorage.getItem("layout"))}window.netlifyIdentity&&window.netlifyIdentity.on("init",e=>{e||window.netlifyIdentity.on("login",()=>{document.location.href="/admin/"})}),document.addEventListener("DOMContentLoaded",function(){document.getElementById("main").addEventListener("click",closeNavigation,!1),"true"===localStorage.getItem("darkmode")?document.body.classList.add("dark"):document.body.classList.remove("dark")}),function(e,t){"use strict";const o=o=>{const a=e.searchIndex.search(o.target.value,{bool:"OR",expand:!0}),n=t.getElementById("searchField"),d=t.getElementById("searchResults"),l=t.getElementById("noResultsFound");t.getElementById("navigation");n.addEventListener("focus",e=>{e.target.classList.remove("hidden"),d.classList.remove("hidden")}),t.addEventListener("click",function(e){n.contains(e.target)||(console.log("hidden"),d.classList.add("hidden"),l.classList.add("hidden"),l.classList.add("hidden"))}),d.innerHTML="",""!=o.target.value?""!=a?(l.classList.add("hidden"),d.classList.add("p-4"),a.map(e=>{const{id:o,title:a,description:n}=e.doc,l=t.createElement("li",{tabindex:"-1"});d.appendChild(l);const i=t.createElement("h3");l.appendChild(i);const s=t.createElement("a");s.setAttribute("href",o),s.textContent=a,i.appendChild(s);const c=t.createElement("p");c.textContent=n,l.appendChild(c)})):l.classList.remove("hidden"):l.classList.add("hidden")};fetch("/docs/search-index.json").then(a=>a.json().then(a=>{e.searchIndex=elasticlunr.Index.load(a),t.getElementById("searchField").addEventListener("input",o)}))}(window,document);</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/elasticlunr/0.9.6/elasticlunr.min.js" defer="defer"></script><script src="/assets/alpine.min.js"></script><script src="/assets/index.js"></script><script src="https://cdn.jsdelivr.net/npm/chart.js"></script><script>document.addEventListener("DOMContentLoaded", function(){
var reg = /^[\'\"]+|[\'\"]+$/g;
//- chart.js
var elements = document.getElementsByClassName('chartjs');
var chartjsLen = elements.length;
var myChartJs = [];
for(var i = 0;i < chartjsLen; i++){
var ctx = elements[i].getContext('2d');
myChartJs[i] = new Chart(ctx,JSON.parse(elements[i].innerHTML));
}
});</script></head><body><nav class="w-full"><div class="container mx-auto px-6 flex items-center justify-between"><div aria-label="Home. logo" role="img"><img class="object-scale-down w-12 h-12" src="/assets/logo.png"></div><div><button onclick="toggleMenu(true)" class="sm:block md:hidden text-gray-500 hover:text-gray-700 focus:text-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500"><svg aria-haspopup="true" aria-label="open Main Menu" xmlns="http://www.w3.org/2000/svg" class="md:hidden icon icon-tabler icon-tabler-menu" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round"><path stroke="none" d="M0 0h24v24H0z"></path><line x1="4" y1="8" x2="20" y2="8"></line><line x1="4" y1="16" x2="20" y2="16"></line></svg></button><div id="menu" class="md:block lg:block hidden"><button onclick="toggleMenu(false)" class="block md:hidden lg:hidden text-gray-500 hover:text-gray-700 focus:text-gray-700 fixed focus:outline-none focus:ring-2 focus:ring-gray-500 z-30 top-0 mt-6"><svg aria-label="close main menu" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button><ul class="flex text-3xl md:text-base items-center py-10 md:flex flex-col md:flex-row justify-center fixed md:relative top-0 bottom-0 left-0 right-0 bg-white md:bg-transparent z-20"><li class="text-gray-800 hover:text-gray-900 cursor-pointer lg:text-lg pt-10 md:pt-0"><a href="https://github.com/glauth/glauth/releases">Releases</a></li><li class="text-gray-800 hover:text-gray-900 cursor-pointer lg:text-lg pt-10 md:pt-0 md:ml-5 lg:ml-10"><a href="/docs/"><strong>Learn/Documentation</strong></a></li><li class="text-gray-800 hover:text-gray-900 cursor-pointer lg:text-lg pt-10 md:pt-0 md:ml-5 lg:ml-10"><div x-data="{ 'showChatModal': false }"><button type="button" @click="showChatModal = true">Chat & Support</button><div class="fixed inset-0 z-30 flex items-center justify-center overflow-auto bg-black bg-opacity-50 transition duration-150 easy-in-out" x-show="showChatModal" @keydown.escape="showChatModal=false"><div role="alert" class="container mx-auto w-11/12 md:w-2/3 max-w-lg flex justify-center" @click.away="showChatModal=false"><div class="flex items-center justify-center py-8 px-4"><div class="relative md:w-80 max-w-xs rounded shadow-lg p-6 dark:bg-gray-800 bg-white"><h1 class="dark:text-gray-100 text-gray-800 font-bold text-lg">Chat & Help</h1><a href="https://gitter.im/glauth/community"><div class="flex items-center justify-between mt-4 border-gray-400 border rounded-lg px-4 py-4 cursor-pointer"><p class="text-base font-medium leading-4 dark:text-gray-100 text-gray-800">Gitter Chat</p><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg></div></a><div class="w-full bg-gray-100 rounded-lg flex items-center justify-between pt-4 pb-0"><p tabindex="0" class="focus:outline-none mb-3 text-sm text-gray-600 dark:text-gray-400 text-center font-normal">You can use Matrix chat if you already have a federated account. To join the conversation:</p></div><div class="bg-indigo-100 rounded p-3"><div tabindex="0" aria-label="copy link" class="focus:outline-none flex items-center"><svg tabindex="0" aria-label="copy link icon" role="img" class="focus:outline-none" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.18213 7.76799L8.47513 7.05999L9.18213 6.35299C9.41594 6.12122 9.60168 5.84554 9.72866 5.54179C9.85565 5.23804 9.92139 4.9122 9.92211 4.58298C9.92283 4.25375 9.85852 3.92763 9.73286 3.62332C9.60721 3.31902 9.42268 3.04253 9.18989 2.80974C8.95709 2.57694 8.6806 2.39241 8.3763 2.26676C8.072 2.1411 7.74587 2.07679 7.41665 2.07751C7.08742 2.07823 6.76158 2.14397 6.45783 2.27096C6.15408 2.39795 5.8784 2.58368 5.64663 2.81749L4.93963 3.52499L4.23213 2.81799L4.94013 2.11099C5.59654 1.45458 6.48682 1.08582 7.41513 1.08582C8.34343 1.08582 9.23372 1.45458 9.89013 2.11099C10.5465 2.7674 10.9153 3.65769 10.9153 4.58599C10.9153 5.5143 10.5465 6.40458 9.89013 7.06099L9.18263 7.76799H9.18213ZM7.76813 9.18199L7.06063 9.88899C6.40422 10.5454 5.51393 10.9142 4.58563 10.9142C3.65732 10.9142 2.76704 10.5454 2.11063 9.88899C1.45422 9.23258 1.08545 8.3423 1.08545 7.41399C1.08545 6.48569 1.45422 5.59541 2.11063 4.93899L2.81813 4.23199L3.52513 4.93999L2.81813 5.64699C2.58431 5.87877 2.39858 6.15445 2.27159 6.4582C2.1446 6.76195 2.07886 7.08779 2.07814 7.41701C2.07742 7.74624 2.14173 8.07236 2.26739 8.37667C2.39305 8.68097 2.57757 8.95746 2.81037 9.19025C3.04317 9.42305 3.31965 9.60758 3.62396 9.73323C3.92826 9.85889 4.25438 9.9232 4.58361 9.92248C4.91284 9.92176 5.23868 9.85602 5.54243 9.72903C5.84618 9.60204 6.12185 9.41631 6.35363 9.18249L7.06063 8.47549L7.76813 9.18249V9.18199ZM7.41413 3.87849L8.12163 4.58599L4.58613 8.12099L3.87863 7.41399L7.41413 3.87899V3.87849Z" fill="#4338CA"/></svg><p class="text-xs pl-3 pr-4 leading-3 text-indigo-700">/join #glauth_community:gitter.im</p></div></div><button aria-label="close modal" class="cursor-pointer absolute top-0 right-0 mt-4 mr-5 dark:text-gray-100 text-gray-400 hover: dark:text-gray-100 text-gray-600 transition duration-150 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black rounded" @click="showChatModal=false"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="20" height="20" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div></div></div></div></div></li></ul></div></div> </div></nav><div id="app" class="h-screen bg-white dark:bg-gray-900"><div class="fixed w-full top-0 left-0 z-10"><nav class="flex h-16 md:h-20 items-center bg-white dark:bg-gray-900 z-20 fixed top-0 left-0 right-0 border-b border-gray-100 px-0 py-2 dark:bg-dark dark:border-gray-800 transition-colors duration-200"><div class="hidden md:block space-y-4 w-full p-4"><a class="no-underline text-gray-600 hover:text-gray-800 font-bold dark:text-gray-500 items-center" href="/"><span class="text-xl">GLAuth</span> <span class="block mt-1 text-sm text-gray-500 hover:text-gray-600 dark:text-gray-600 font-normal text-xs sm:text-xs md:text-sm lg:text-sm w-full">Documentation</span></a></div><div class="mr-2 relative w-full md:w-64"><input aria-label="Search" x-data="{ isOpen: true }" x-bind:class="{ 'hidden': !isOpen }" type="search" placeholder="Search..." class="ml-2 w-60 bg-gray-50 dark:bg-gray-800 appearance-none border dark:border-gray-700 rounded py-2 px-2 placeholder-gray-300 leading-tight focus:ring-4 focus:ring-blue-200 dark:focus:ring-gray-700 ring-opacity-50 border-gray-200" id="searchField"><ul tabindex="0" class="bg-white dark:bg-gray-200 z-50 shadow-md p-0 w-full list-none m-0 absolute left-0 md:right-0 bg-white rounded mt-1 top-100 z-50" id="searchResults"></ul><div class="hidden shadow-md list-none p-4 m-0 absolute left-0 md:right-0 bg-white rounded mt-1 border top-100 divide-y divide-gray-300 z-2" id="noResultsFound"><p>No results found.</p></div></div><button aria-label="Show navigation" onclick="showNavigation()" class="block md:hidden mr-3"><svg fill="none" width="24" height="24" viewBox="0 0 24 24" class="text-gray-400 hover:text-gray-600" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button> <a aria-label="dark mode" rel="noopener noreferrer" class="mr-3 switch text-current cursor-pointer" onclick="activateDarkMode()"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="24" xmlns="http://www.w3.org/2000/svg"><path class="text-gray-400 hover:text-yellow-400 dark:text-yellow-400" fill-rule="evenodd" clip-rule="evenodd" d="M11.67 8.658a3.661 3.661 0 0 0-.781 1.114 3.28 3.28 0 0 0-.268 1.329v1.6a1.304 1.304 0 0 1-.794 1.197 1.282 1.282 0 0 1-.509.102H7.712a1.285 1.285 0 0 1-.922-.379 1.303 1.303 0 0 1-.38-.92v-1.6c0-.479-.092-.921-.274-1.329a3.556 3.556 0 0 0-.776-1.114 4.689 4.689 0 0 1-1.006-1.437A4.187 4.187 0 0 1 4 5.5a4.432 4.432 0 0 1 .616-2.27c.197-.336.432-.64.705-.914a4.6 4.6 0 0 1 .911-.702c.338-.196.7-.348 1.084-.454a4.45 4.45 0 0 1 1.2-.16 4.476 4.476 0 0 1 2.276.614 4.475 4.475 0 0 1 1.622 1.616 4.438 4.438 0 0 1 .616 2.27c0 .617-.117 1.191-.353 1.721a4.69 4.69 0 0 1-1.006 1.437zM9.623 10.5H7.409v2.201c0 .081.028.15.09.212a.29.29 0 0 0 .213.09h1.606a.289.289 0 0 0 .213-.09.286.286 0 0 0 .09-.212V10.5z"></path></svg></a></nav></div><nav id="navigation" class="fixed inset-y-0 overflow-x-hidden overflow-y-auto hidden w:64 lg:w-72 mt-20 md:block dark:bg-gray-900 flex-none top-0 p-4 w-64 md:border-r border-b border-gray-100 dark:border-gray-800"><button name="Close navigation" onclick="closeNavigation()" class="float-right justify-end block md:hidden -mr-4 p-6"><svg xmlns="http://www.w3.org/2000/svg" class="dark:bg-gray-500" width="18" height="18" viewBox="0 0 18 18"><path class="text-gray-100" d="M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z"/></svg></button><div class="clear-right"><a href="/"><div class="block md:hidden pt-4 font-semibold text-gray-500">GLAuth</div><div class="block md:hidden text-sm text-gray-500 mb-4">Documentation</div></a><ul class="nav"><li class="item"><a href="/docs/" class="item">Introduction</a></li><li class="item"><a href="/docs/compatibility.html" class="item">Compatibility</a></li><li class="item"><a href="/docs/quickstart.html" class="item">Quick Start</a></li><li class="item"><a href="/docs/setup.html" class="item">Setup</a><ul><li class="item active"><a href="/docs/containerization.html" class="item active">Containerization</a></li><li class="item"><a href="/docs/kubernetes.html" class="item">Kubernetes</a></li></ul></li><li class="item"><a href="/docs/backends.html" class="item">Backends</a><ul><li class="item"><a href="/docs/file.html" class="item">Config/File</a></li><li class="item"><a href="/docs/s3.html" class="item">S3</a></li><li class="item"><a href="/docs/owncloud.html" class="item">ownCloud</a></li><li class="item"><a href="/docs/databases.html" class="item">Databases</a><ul><li class="item"><a href="/docs/sqlite.html" class="item">SQLite</a></li><li class="item"><a href="/docs/mysql.html" class="item">MySQL/MariaDB</a></li><li class="item"><a href="/docs/postgresql.html" class="item">Postgresql</a></li></ul></li></ul></li><li class="item"><a href="/docs/web-ui.html" class="item">Web UI</a></li><li class="item"><a href="/docs/security.html" class="item">Security</a><ul><li class="item"><a href="/docs/rate-limiting.html" class="item">Rate Limiting</a></li><li class="item"><a href="/docs/multifactor.html" class="item">Multi Factor Auth</a></li><li class="item"><a href="/docs/yubikey.html" class="item">Yubikey</a></li><li class="item"><a href="/docs/openssh-keys.html" class="item">OpenSSH Keys</a></li></ul></li><li class="item"><a href="/docs/capabilities.html" class="item">Capabilities</a></li><li class="item"><a href="/docs/custom-attributes.html" class="item">Custom Attributes</a></li><li class="item"><a href="/docs/high-availability.html" class="item">High Availability</a></li><li class="item"><a href="/docs/ssh-integration.html" class="item">SSH Integration</a><ul><li class="item"><a href="/docs/ssh-libpam-ldap-ncsd.html" class="item">Libmap-ldap and ncsd</a></li><li class="item"><a href="/docs/ssh-sssd.html" class="item">SSSD</a></li></ul></li><li class="item"><a href="/docs/rfcs-and-extensions.html" class="item">RFCs & Extensions</a></li><li class="item"><a href="/docs/limitations.html" class="item">Limitations</a></li><li class="item"><a href="/docs/related-projects.html" class="item">Related Projects</a></li><li class="item"><a href="/docs/development.html" class="item">Development</a><ul><li class="item"><a href="/docs/building.html" class="item">Building</a></li><li class="item"><a href="/docs/logging.html" class="item">Logging</a></li><li class="item"><a href="/docs/testing.html" class="item">Testing</a></li><li class="item"><a href="/docs/debugging-ldap-behaviors.html" class="item">Debugging LDAP Behaviors</a></li><li class="item"><a href="/docs/openldap-setup.html" class="item">OpenLDAP Setup</a></li><li class="item"><a href="/docs/running-travis-ci-locally.html" class="item">Running Travis-CI Locally</a></li><li class="item"><a href="/docs/shipping-using-podman.html" class="item">Using Podman (Deprecated)</a></li></ul></li><li class="item"><a href="/docs/scratch.html" class="item">Scratch</a></li></ul></div></nav><main id="main" class="dark:bg-gray-900 pt-16 sm:pt-18 md:pt-20 md:pl-64 lg:pl-72"><div class="flex w-full justify-center"><div class="mt-4 px-6 md:px-6 lg:px-8 xl:px-12 w-full max-w-5xl"><div class="wrapper flex justify-between"><div class="main flex flex-col pr-0 prose sm:prose lg:prose-lg xl:prose-md"><article><h1 class="dark:text-gray-500">Containerization</h1><div class="self-center adjust dark:text-gray-400"><p>To run GLAuth in a container, you have three choices:</p><ul><li>Fetch and instantiate an image from Docker Hub (the most popular approach)</li><li>Clone the GLAuth repository and manually create your image</li><li>Use Kubernetes’s Helm chart</li></ul><p>The default approach looks like this:</p><pre><code class="language-shell">docker run -d glauth/glauth
</code></pre><p>or to run GLAuth with its plugins:</p><pre><code class="language-shell">docker run -d glauth/glauth-plugins
</code></pre><p>To specify your own config file (which is the most likely scenario):</p><pre><code class="language-shell">docker run -d \
-v <path>/config.cfg:/app/config/config.cfg \
glauth/glauth
</code></pre><p>And to expose port numbers (unless you are using a reverse proxy):</p><pre><code class="language-shell">docker run -d \
-p 389:3893 \
-p 636:3894 \
-p 5555:5555 \
glauth/glauth
</code></pre><h2 id="sqlite">sqlite</h2><p>If you are using sqlite, please follow these instructions to avoid losing your data!</p><p>You sqlite database must be made permanent. It can either be stored on the host, on in a dedicated volume (more difficult)</p><div class="warning"><p>You database will be clobbered if you do not specify a configuration file. Unless…</p></div><h3 id="method-%231%3A-configuration-file-%2B-database-file-on-host">Method #1: configuration file + database file on host</h3><p>Retrieve a base database file from <a href="https://github.com/glauth/glauth/raw/master/v2/docker/assets/gl.db" target="_blank" rel="noopener noreferrer">https://github.com/glauth/glauth/raw/master/v2/docker/assets/gl.db</a></p><pre><code class="language-shell">docker run -d \
-v <path>/config.cfg:/app/config/config.cfg \
-v <path>/gl.db:/app/config/gl.db \
glauth/glauth
</code></pre><h3 id="method-%232%3A-no-configuration-file%2C-but-database-file-on-host">Method #2: no configuration file, but database file on host</h3><p>In this scenario, the container’s startup script will copy the database file over its working file.</p><pre><code class="language-shell">docker run -d \
-v <path>/gl.db:/app/docker/gl.db \
glauth/glauth
</code></pre><h2 id="ldap-certificates">LDAP certificates</h2><p>You definitely should not be using the default certificates in production!</p><p>First, modify your configuration file to point to where your certificate files will be mounted in your container. <code>/app/config</code> is a good option.</p><p>Then:</p><pre><code class="language-shell">docker run -d \
-v <path>/config.cfg:/app/config/config.cfg \
-v <path>/cert.pem:/app/config/cert.pem \
-v <path>/key.pem:/app/config/key.pem \
glauth/glauth
</code></pre><ul class="footer-nav pt-4 mb-8 ml-0 pl-0 flex flex-wrap flex-row-reverse justify-between mt-8 list-none"><li class="ml-0 pl-0"><a class="font-semibold text-gray-500 hover:text-gray-900" href="/docs/kubernetes.html">Kubernetes</a> <svg height="24" fill="none" viewBox="0 0 24 24" stroke="#6B7280" class="inline ml-1 flex-shrink-0"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></li><li class="ml-0 pl-0"><svg height="24" fill="none" viewBox="0 0 24 24" stroke="#6B7280" class="transform rotate-180 inline mr-1 flex-shrink-0"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg> <a class="font-semibold text-gray-500 hover:text-gray-900" href="/docs/setup.html">Setup</a></li></ul></div></article></div></div></div></div><div class="z-50 mt-12 h-12 flex dark:bg-gray-900 text-gray-500 dark:text-gray-400 justify-center p-2 border-t border-gray-100 dark:border-gray-800"><div class="flex w-full items-center"><div class="w-6 h-6 flex-none"></div><div class="text-gray-500 flex flex-grow justify-center text-align-center"><small>Copyright 2021</small></div></div></div></main></div></body></html>