1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-02-22 12:25:17 +00:00

Updated Docker Installation (textile)

FrancescoFdd5 2020-01-09 17:48:51 +01:00
parent 30f3e9faa3
commit 0f6feb10e7

@ -12,18 +12,20 @@ yum install git python</code></pre>
<pre><code>cd webvirtcloud/</code></pre>
# Copy the setting.py file
<pre><code>cp webvirtcloud/settings.py.template webvirtcloud/settings.py</code></pre>
# Enter python command interpreter:
<pre><code>python</code></pre>
# Generate random number using Python:
<pre><code>import random, string
haystack = string.ascii_letters + string.digits + string.punctuation
print(''.join([random.SystemRandom().choice(haystack) for _ in range(50)]))
# Generate random number using Python. *Copy and paste the entire command*:
<pre><code>echo "import random, string" > /tmp/key.py && \
echo "haystack = string.ascii_letters + string.digits + string.punctuation" >> /tmp/key.py && \
echo "print(''.join([random.SystemRandom().choice(haystack) for _ in range(50)]))" >> /tmp/key.py && \
python /tmp/key.py && \
rm /tmp/key.py
</code></pre>
# copy 'generated code' and paste it to webvirtcloud/settings.py as SECRET_KEY = ''
# Copy 'generated code' and paste it to webvirtcloud/settings.py as SECRET_KEY = ''
# Build the docker container
<pre><code>docker build -t retspen/webvirtcloud:0.1 .</code></pre>
# Start the container. *Use this command only for the first start*
<pre><code>docker run -d -p 80:80 -p 6080:6080 retspen/webvirtcloud:0.1</code></pre>
# (Optional) If you want you can change the port of the webpage by changing the previous command
<pre><code>docker run -d -p <port>:80 -p 6080:6080 retspen/webvirtcloud:0.1</code></pre>
# Run browser enter host url with http.
# Login with: Username admin, password admin
# Change your admin password