Update 'hertzner.py'
This commit is contained in:
parent
415abc7c8b
commit
ef5f109964
27
hertzner.py
27
hertzner.py
@ -6,7 +6,6 @@ from hcloud.server_types import ServerType
|
|||||||
from hcloud._exceptions import APIException
|
from hcloud._exceptions import APIException
|
||||||
from hcloud.servers.domain import ServerCreatePublicNetwork
|
from hcloud.servers.domain import ServerCreatePublicNetwork
|
||||||
|
|
||||||
from time import sleep
|
|
||||||
|
|
||||||
|
|
||||||
YOUR_API_TOKEN = ""
|
YOUR_API_TOKEN = ""
|
||||||
@ -98,15 +97,15 @@ runcmd:
|
|||||||
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
- systemctl enable docker
|
- systemctl enable docker
|
||||||
- systemctl start docker
|
- systemctl start docker
|
||||||
- git clone https://git.wmi.amu.edu.pl/s434686/zpzc-3
|
- git clone https://git.wmi.amu.edu.pl/s434686/zpzc-3.git /zpzc-3
|
||||||
|
- docker compose -f /zpzc-3/db.yml up -d
|
||||||
|
- echo 'Done'
|
||||||
|
|
||||||
|
bootcmd:
|
||||||
|
- docker compose -f /zpzc-3/db.yml up -d
|
||||||
|
|
||||||
final_message: "The system is finally up, after $UPTIME seconds"
|
final_message: "The system is finally up, after $UPTIME seconds"
|
||||||
bootcmd:
|
"""
|
||||||
- cd zpzc-3
|
|
||||||
- docker compose -f db.yml up -d
|
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
db_server = response.server
|
db_server = response.server
|
||||||
print(f"{db_server.id=} {db_server.name=} {db_server.status=}")
|
print(f"{db_server.id=} {db_server.name=} {db_server.status=}")
|
||||||
@ -150,18 +149,16 @@ runcmd:
|
|||||||
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
- systemctl enable docker
|
- systemctl enable docker
|
||||||
- systemctl start docker
|
- systemctl start docker
|
||||||
- git clone https://git.wmi.amu.edu.pl/s434686/zpzc-3
|
- git clone https://git.wmi.amu.edu.pl/s434686/zpzc-3.git /zpzc-3
|
||||||
- cd zpzc-3
|
- docker compose -f /zpzc-3/gitea.yml up -d
|
||||||
- docker compose -f db.yml up -d
|
- echo 'Done'
|
||||||
|
|
||||||
|
|
||||||
|
bootcmd:
|
||||||
|
- docker compose -f /zpzc-3/gitea.yml up -d
|
||||||
|
|
||||||
final_message: "The system is finally up, after $UPTIME seconds"
|
final_message: "The system is finally up, after $UPTIME seconds"
|
||||||
|
|
||||||
bootcmd:
|
"""
|
||||||
- cd zpzc-3
|
|
||||||
- docker compose -f db.yml up -d
|
|
||||||
""",
|
|
||||||
)
|
)
|
||||||
_gitea_server = gitea_server.server
|
_gitea_server = gitea_server.server
|
||||||
print(f"{_gitea_server.id=} {_gitea_server.name=} {_gitea_server.status=}, {gitea_server.root_password} ")
|
print(f"{_gitea_server.id=} {_gitea_server.name=} {_gitea_server.status=}, {gitea_server.root_password} ")
|
||||||
|
Loading…
Reference in New Issue
Block a user