kopia lustrzana https://github.com/linuxserver/docker-documentation
Deployed f3319993
with MkDocs version: 1.5.2
rodzic
fdf6a4b2f6
commit
3cb5aa0df9
|
@ -2,7 +2,7 @@
|
|||
</span><span id=__span-0-2><a id=__codelineno-0-2 name=__codelineno-0-2 href=#__codelineno-0-2></a><span class=nx>db</span><span class=p>.</span><span class=nx>getSiblingDB</span><span class=p>(</span><span class=s2>"MONGO_DBNAME_stat"</span><span class=p>).</span><span class=nx>createUser</span><span class=p>({</span><span class=nx>user</span><span class=o>:</span><span class=w> </span><span class=s2>"MONGO_USER"</span><span class=p>,</span><span class=w> </span><span class=nx>pwd</span><span class=o>:</span><span class=w> </span><span class=s2>"MONGO_PASS"</span><span class=p>,</span><span class=w> </span><span class=nx>roles</span><span class=o>:</span><span class=w> </span><span class=p>[{</span><span class=nx>role</span><span class=o>:</span><span class=w> </span><span class=s2>"readWrite"</span><span class=p>,</span><span class=w> </span><span class=nx>db</span><span class=o>:</span><span class=w> </span><span class=s2>"MONGO_DBNAME_stat"</span><span class=p>}]});</span>
|
||||
</span></code></pre></div> <p>Being sure to replace the placeholders with the same values you supplied to the Unifi container, and mount it into your <em>mongodb</em> container.</p> <div class="language-yaml highlight"><pre><span></span><code><span id=__span-1-1><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a><span class=nt>volumes</span><span class=p>:</span>
|
||||
</span><span id=__span-1-2><a id=__codelineno-1-2 name=__codelineno-1-2 href=#__codelineno-1-2></a><span class=w> </span><span class="p p-Indicator">-</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro</span>
|
||||
</span></code></pre></div> <p><em>Note that the init script method will only work on first run. If you start the mongodb container without an init script it will generate test data automatically and you will have to manually create your databases, or restart with a clean <code>/data/db</code> volume and an init script mounted.</em></p> <p>You can also run the commands directly against the database using either <code>mongo</code> (< 6.0) or <code>mongosh</code> (>= 6.0).</p> <h3 id=device-adoption>Device Adoption<a class=headerlink href=#device-adoption title="Permanent link">¶</a></h3> <p>For Unifi to adopt other devices, e.g. an Access Point, it is required to change the inform IP address. Because Unifi runs inside Docker by default it uses an IP address not accessible by other devices. To change this go to Settings > System > Advanced and set the Inform Host to a hostname or IP address accessible by your devices. Additionally the checkbox "Override" has to be checked, so that devices can connect to the controller during adoption (devices use the inform-endpoint during adoption).</p> <p><strong>Please note, Unifi change the location of this option every few releases so if it's not where it says, search for "Inform" or "Inform Host" in the settings.</strong></p> <p>In order to manually adopt a device take these steps:</p> <div class="language-text highlight"><pre><span></span><code><span id=__span-2-1><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a>ssh ubnt@$AP-IP
|
||||
</span></code></pre></div> <p><em>Note that the init script method will only work on first run. If you start the mongodb container without an init script it will generate test data automatically and you will have to manually create your databases, or restart with a clean <code>/data/db</code> volume and an init script mounted.</em></p> <p><em>If you are using the init script method do not also set <code>MONGO_INITDB_ROOT_USERNAME</code> or <code>MONGO_INITDB_ROOT_PASSWORD</code> values as they will cause conflicts.</em></p> <p>You can also run the commands directly against the database using either <code>mongo</code> (< 6.0) or <code>mongosh</code> (>= 6.0).</p> <h3 id=device-adoption>Device Adoption<a class=headerlink href=#device-adoption title="Permanent link">¶</a></h3> <p>For Unifi to adopt other devices, e.g. an Access Point, it is required to change the inform IP address. Because Unifi runs inside Docker by default it uses an IP address not accessible by other devices. To change this go to Settings > System > Advanced and set the Inform Host to a hostname or IP address accessible by your devices. Additionally the checkbox "Override" has to be checked, so that devices can connect to the controller during adoption (devices use the inform-endpoint during adoption).</p> <p><strong>Please note, Unifi change the location of this option every few releases so if it's not where it says, search for "Inform" or "Inform Host" in the settings.</strong></p> <p>In order to manually adopt a device take these steps:</p> <div class="language-text highlight"><pre><span></span><code><span id=__span-2-1><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a>ssh ubnt@$AP-IP
|
||||
</span><span id=__span-2-2><a id=__codelineno-2-2 name=__codelineno-2-2 href=#__codelineno-2-2></a>set-inform http://$address:8080/inform
|
||||
</span></code></pre></div> <p>The default device password is <code>ubnt</code>. <code>$address</code> is the IP address of the host you are running this container on and <code>$AP-IP</code> is the Access Point IP address.</p> <p>When using a Security Gateway (router) it could be that network connected devices are unable to obtain an ip address. This can be fixed by setting "DHCP Gateway IP", under Settings > Networks > network_name, to a correct (and accessible) ip address.</p> <h3 id=migration-from-unifi-controller>Migration From <a href=https://github.com/linuxserver/docker-unifi-controller>Unifi-Controller</a><a class=headerlink href=#migration-from-unifi-controller title="Permanent link">¶</a></h3> <p>If you were using the <code>mongoless</code> tag for the Unifi Controller container, you can switch directly to the Unifi Network Application container without needing to perform any migration steps.</p> <p><strong>You cannot perform an in-place upgrade from an existing Unifi-Controller container, you must run a backup and then a restore.</strong></p> <p>The simplest migration approach is to take a full backup of your existing install, including history, from the Unifi-Controller web UI, then shut down the old container.</p> <p>You can then start up the new container with a clean <code>/config</code> mount (and a database container configured), and perform a restore using the setup wizard.</p> <h3 id=strict-reverse-proxies>Strict reverse proxies<a class=headerlink href=#strict-reverse-proxies title="Permanent link">¶</a></h3> <p>This image uses a self-signed certificate by default. This naturally means the scheme is <code>https</code>. If you are using a reverse proxy which validates certificates, you need to <a href=https://docs.linuxserver.io/faq#strict-proxy>disable this check for the container</a>.</p> <h2 id=usage>Usage<a class=headerlink href=#usage title="Permanent link">¶</a></h2> <p>To help you get started creating a container from this image you can either use docker-compose or the docker cli.</p> <h3 id=docker-compose-recommended-click-here-for-more-info>docker-compose (recommended, <a href=https://docs.linuxserver.io/general/docker-compose>click here for more info</a>)<a class=headerlink href=#docker-compose-recommended-click-here-for-more-info title="Permanent link">¶</a></h3> <div class="language-yaml highlight"><pre><span></span><code><span id=__span-3-1><a id=__codelineno-3-1 name=__codelineno-3-1 href=#__codelineno-3-1></a><span class=nn>---</span>
|
||||
</span><span id=__span-3-2><a id=__codelineno-3-2 name=__codelineno-3-2 href=#__codelineno-3-2></a><span class=nt>version</span><span class=p>:</span><span class=w> </span><span class=s>"2.1"</span>
|
||||
|
|
File diff suppressed because one or more lines are too long
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue