update app env and nginx to cater for minio

This commit is contained in:
2024-07-18 10:27:27 +02:00
parent 9189201229
commit e7862d1638
5 changed files with 15 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
@override @override
void initState() { void initState() {
//print("Home tile gird widget: ${widget.userEmail}");
tileList = [ tileList = [
[ [
Icons.medication, Icons.medication,

View File

@@ -17,8 +17,8 @@ abstract class AppEnviroment {
} }
case Enviroment.prod: case Enviroment.prod:
{ {
baseApiUrl = "http://mzansi-innovation-hub.co.za/api"; baseApiUrl = "https://mzansi-innovation-hub.co.za/api";
baseFileUrl = "http://mzansi-innovation-hub.co.za:9000"; baseFileUrl = "https://mzansi-innovation-hub.co.za/files";
break; break;
} }
} }

View File

@@ -47,6 +47,7 @@ class _HomeState extends State<Home> {
future: getUserEmail(), future: getUserEmail(),
builder: (contexts, snapshot) { builder: (contexts, snapshot) {
if (snapshot.connectionState == ConnectionState.done) { if (snapshot.connectionState == ConnectionState.done) {
//print("home page: $useremail");
return Scaffold( return Scaffold(
appBar: const MyAppBar(barTitle: "Mzansi Innovation Hub"), appBar: const MyAppBar(barTitle: "Mzansi Innovation Hub"),
drawer: HomeAppDrawer(userEmail: useremail), drawer: HomeAppDrawer(userEmail: useremail),

View File

@@ -37,8 +37,8 @@ class _PatientManagerState extends State<PatientManager> {
//print("Patien manager page: $endpoint"); //print("Patien manager page: $endpoint");
final response = await http.get(Uri.parse(endpoint)); final response = await http.get(Uri.parse(endpoint));
// print("Here"); // print("Here");
// print(response.body); // print("Body: ${response.body}");
// print(response.statusCode); // print("Code: {response.statusCode}");
errorCode = response.statusCode.toString(); errorCode = response.statusCode.toString();
errorBody = response.body; errorBody = response.body;
@@ -206,7 +206,7 @@ class _PatientManagerState extends State<PatientManager> {
), ),
child: Center( child: Center(
child: Text( child: Text(
"$errorCode: Error pulling Patients Data\n$endpoint\n$errorBody", "$errorCode: Error pulling Patients Data\n$endpoint${widget.userEmail}\n$errorBody",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzanziInnovationHub.of(context)! color: MzanziInnovationHub.of(context)!
@@ -228,6 +228,7 @@ class _PatientManagerState extends State<PatientManager> {
void initState() { void initState() {
// errorCode = ""; // errorCode = "";
// errorBody = ""; // errorBody = "";
//print("patient manager page: ${widget.userEmail}");
futurePatients = fetchPatients(endpoint + widget.userEmail); futurePatients = fetchPatients(endpoint + widget.userEmail);
super.initState(); super.initState();
} }

View File

@@ -25,15 +25,21 @@ http {
root /var/www/html; root /var/www/html;
index index.php index.html index.htm; index index.php index.html index.htm;
# Web App
location / { location / {
proxy_pass http://MIH-UX:83/; proxy_pass http://MIH-UX:83/;
} }
# API Hub
location /api/ { location /api/ {
proxy_pass http://MIH-API-Hub:8080/; proxy_pass http://MIH-API-Hub:8080/;
} }
#Minio storage
location /files/ {
proxy_pass http://MIH-Minio:9000/;
}
location ~ /.well-known/acme-challenge/ { location ~ /.well-known/acme-challenge/ {
root /var/www/certbot; root /var/www/certbot;
} }