-
Notifications
You must be signed in to change notification settings - Fork 374
Docker Installation & Update
catborise edited this page Dec 20, 2021
·
4 revisions
First Install Docker-ce (on host or guest): Official Docker Installation Guide
Steps:
- Install git, python3
sudo apt install git python3 or yum install git python3
- Clone from repository
git clone https://github.com/retspen/webvirtcloud.git
- Move to the installation folder
cd webvirtcloud/
- Copy the setting.py file
cp webvirtcloud/settings.py.template webvirtcloud/settings.py
- Generate random number using Python script:
python3 conf/runit/secret_generator.py
- Copy ‘generated code’ and paste it to webvirtcloud/settings.py as SECRET_KEY = ’’
- Build the docker container
docker build -t retspen/webvirtcloud:1 .
- Start the container. Use this command only for the first start
docker run -d -p 80:80 -p 6080:6080 retspen/webvirtcloud:1
- (Optional) If you want you can change the port of the webpage by changing the previous command
docker run -d -p <port>:80 -p 6080:6080 retspen/webvirtcloud:1
- Run browser enter host url with http.
- Login with: Username admin, password admin
- Change your admin password
- Add new host
Reverse Proxy
- Edit WS_PUBLIC_PORT in settings.py which is default value 6080
##Websock public port - 80 or 443 if reverse-proxy, else 6080 WS_PUBLIC_PORT = 80
- Run webvirtcloud container with that command:
docker run -d -p 80:80 retspen/webvirtcloud:1
Additional Information:
- Docker run command creates new container from base image.
- To stop docker container use:
docker stop <container id>
- To get cointainer id use:
docker ps -a or docker container ls
- After the first run, the container must be started with “start” command.
docker start <container id>
Update Webvirtcloud:
- Enter running container
docker exec -it <container id> /bin/bash
- Run followed commands
cd /srv/webvirtcloud source venv/bin/activate git pull pip install -U -r conf/requirements.txt python manage.py makemigrations python manage.py migrate
- Check webvirtcloud/settings.py.template to see if there is new configs… If it is, then copy them to webvirtcloud/settings.py file