ERPNext v14 Docker installation in cloud
$ apt update -y
$ apt install docker.io -y
$ docker --version
$ systemctl start docker
$ systemctl enable docker
$ systemctl status docker
$ curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ ls -lsh /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
$ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
$ docker-compose --version
$ mkdir -p ~/.docker/cli-plugins
$ curl -sSL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
$ chmod +x ~/.docker/cli-plugins/docker-compose
$ docker compose version
$ git clone https://github.com/frappe/frappe_docker
$ cd frappe_docker/
$ mkdir ~/gitops
$ echo 'TRAEFIK_DOMAIN=traefik.hashlabs.in' > ~/gitops/traefik.env
$ echo 'EMAIL=tkdana@gmail.com' >> ~/gitops/traefik.env
$ echo 'HASHED_PASSWORD='$(openssl passwd -apr1 Passw0rd | sed 's/\$/\\\$/g') >> ~/gitops/traefik.env
$ vim /etc/hosts
172.105.123.45 traefik.hashlabs.in
172.105.123.45 one.hashlabs.in
172.105.123.45 two.hashlabs.in
:wq!
$ docker-compose --project-name traefik --env-file ~/gitops/traefik.env -f overrides/compose.traefik.yaml -f overrides/compose.traefik-ssl.yaml up -d
$ echo "DB_PASSWORD=StrongPassw0rd" > ~/gitops/mariadb.env
$ docker-compose --project-name mariadb --env-file ~/gitops/mariadb.env -f overrides/compose.mariadb-shared.yaml up -d
$ cp example.env ~/gitops/erpnext-one.env
$ sed -i 's/DB_PASSWORD=123/DB_PASSWORD=StrongPassw0rd/g' ~/gitops/erpnext-one.env
$ sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitops/erpnext-one.env
$ sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitops/erpnext-one.env
$ sed -i 's/SITES=`erp.example.com`/SITES=\`one.hashlabs.in\`,\`two.hashlabs.in\`/g' ~/gitops/erpnext-one.env
$ echo 'ROUTER=erpnext-one' >> ~/gitops/erpnext-one.env
$ echo "BENCH_NETWORK=erpnext-one" >> ~/gitops/erpnext-one.env
$ docker-compose --project-name erpnext-one --env-file ~/gitops/erpnext-one.env -f compose.yaml -f overrides/compose.redis.yaml -f overrides/compose.multi-bench.yaml -f overrides/compose.multi-bench-ssl.yaml config > ~/gitops/erpnext-one.yaml
$ docker-compose --project-name erpnext-one -f ~/gitops/erpnext-one.yaml up -d
$ docker-compose --project-name erpnext-one exec backend bench new-site one.hashlabs.in --no-mariadb-socket --mariadb-root-password StrongPassw0rd --install-app erpnext --admin-password zha123
$ docker-compose --project-name erpnext-one exec backend bench new-site two.hashlabs.in --no-mariadb-socket --mariadb-root-password StrongPassw0rd --install-app erpnext --admin-password zha123