This commit is contained in:
olczig 2023-01-28 22:52:31 +01:00
parent 361ee542c2
commit 5557e1c2c9
2 changed files with 10 additions and 10 deletions

View File

@ -6,14 +6,14 @@
var data = new FormData()
data.append('file', document.getElementById("docpicker").files[0])
document.getElementById("result").innerHTML = "Fetching..."
resp = await fetch('http://:80/invoice', {method: "POST", body: data})
resp = await fetch('http://44.208.164.194:80/invoice', {method: "POST", body: data})
document.getElementById("result").innerHTML = "Fetched..."
data = await resp.json()
var result = JSON.stringify(data)
document.getElementById("result").innerHTML = result
}
</script>
<title>Chmuuuuuuurki</title>
<title>Chmura</title>
</head>
<body>
<input type="file" id="docpicker" accept=".pdf" onchange="parse()" />

View File

@ -1,8 +1,8 @@
aws_access_key_id=''
aws_secret_access_key=''
aws_session_token=''
VPC=''
ID='444376'
aws_access_key_id="ASIATX53GASX2ATRMAQU"
aws_secret_access_key="u7/YjWsa9eOKEkO3V40nNHycBT2Dt3Ce0OEInYqi"
aws_session_token="FwoGZXIvYXdzEP7//////////wEaDO/NQgbzkIfgxuWQZyLFAenjajTNxXGZeuKz9qrQYg3Qk8owHN4NF2boShuAvcdMaoN0uLag0TFN56rtRkMWzER8IaF9vy3CfHIwP/HZ2KBiYYD795rXPRGlvIr18ut1QJ2Sn0yX7U3ZTC+C44GtsDHppDBxUqISKw0URvMOehYANcIqgjIa++zEuV3AYNpADt/1qBdrADtSk8p4UQ016GRgEMp4yAmow1jJaJ3i7eoXxaXQzyuqH9jCCOFJVrvMpO8aqxK+u+Mz9KDTjyXCj4YqRgBPKL+L1p4GMi1QzeIQtQ2ZqFqXqYzpMWogji8zzQW9EeQkyoKENmcPV8PBIpa/YRHP/CzYvlg="
VPC='vpc-0e72b15a580db6483'
ID='olaa'
import boto3
ec2 = boto3.resource(
@ -43,13 +43,13 @@ instances = ec2.create_instances(
#!/bin/bash
sudo yum update -y
sudo yum install git -y
git clone git clone https://git.wmi.amu.edu.pl/s444376/DPZC_Ola.git
git clone https://git.wmi.amu.edu.pl/s444376/DPZC_Ola.git
cd DPZC_Ola/Zadanie_5.2_5.3
sudo yum install docker -y
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo docker build -t invoice .
sudo docker run -d -p 80:8000 -t invoice
docker build -t invoice .
docker run -d -p 80:8000 -t invoice
''',
SecurityGroups=[security_group.group_name]
)