**Infrastructure**
----
All infrastructure is running on Docker.
For Docker management is used portainer.
Portainer access: https://daidze.org:8443
All containers must be in custom docker network: 192.168.0.0/16
Ip range from 192.168.0.0 - 192.168.0.10 reserved for internal usage, don't use it for containers
docker network create --subnet=192.168.0.0/16 cloudznet
docker run --net cloudznet --ip 192.168.0.11 -it ubuntu bash
Example of run.sh:
#!/bin/bash
# Please set up name for container, hostname and ports
CLDZ=dev
HOSTNAME=dev.msysc.org
SPORT=7001
NPORT=7002
echo "############################################"
echo "Setting up cloud: $CLDZ"
docker run --name=${CLDZ} \
-e DB_HOST_IP=$(hostname -I | cut -f1 -d' ') \
-e DB_NAME=${CLDZ} \
--net cloudnet \
--ip 192.168.0.11 \
--hostname=${HOSTNAME} \
-p ${SPORT}:443 \
-p ${NPORT}:80 \
--env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
--volume=/opt/ns/clients/${CLDZ}:/opt/ns/client \
--volume=/opt/ns/modules/nsssl:/opt/ns/modules/nsssl \
--volume=/opt/ns/lib/chilkat:/opt/ns/lib/chilkat \
--volume=/opt/ns/tcl/dz:/opt/ns/tcl/dz \
--volume=/opt/ns/tcl/oodz:/opt/ns/tcl/oodz \
--volume=/opt/ns/logs \
--volume=/opt/ns/client \
--volume=/opt/ns/modules/nsssl \
--volume=/opt/ns/lib/chilkat \
--volume=/opt/ns/tcl/dz \
--volume=/opt/ns/tcl/oodz \
--workdir=/opt/ns \
--restart=always \
--runtime=runc \
--detach=true cloudz:latest