forked from yaso_meth/mih-project
update app env and nginx to cater for minio
This commit is contained in:
@@ -15,6 +15,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
//print("Home tile gird widget: ${widget.userEmail}");
|
||||
tileList = [
|
||||
[
|
||||
Icons.medication,
|
||||
|
||||
4
Frontend/patient_manager/lib/env/env.dart
vendored
4
Frontend/patient_manager/lib/env/env.dart
vendored
@@ -17,8 +17,8 @@ abstract class AppEnviroment {
|
||||
}
|
||||
case Enviroment.prod:
|
||||
{
|
||||
baseApiUrl = "http://mzansi-innovation-hub.co.za/api";
|
||||
baseFileUrl = "http://mzansi-innovation-hub.co.za:9000";
|
||||
baseApiUrl = "https://mzansi-innovation-hub.co.za/api";
|
||||
baseFileUrl = "https://mzansi-innovation-hub.co.za/files";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ class _HomeState extends State<Home> {
|
||||
future: getUserEmail(),
|
||||
builder: (contexts, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
//print("home page: $useremail");
|
||||
return Scaffold(
|
||||
appBar: const MyAppBar(barTitle: "Mzansi Innovation Hub"),
|
||||
drawer: HomeAppDrawer(userEmail: useremail),
|
||||
|
||||
@@ -37,8 +37,8 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
//print("Patien manager page: $endpoint");
|
||||
final response = await http.get(Uri.parse(endpoint));
|
||||
// print("Here");
|
||||
// print(response.body);
|
||||
// print(response.statusCode);
|
||||
// print("Body: ${response.body}");
|
||||
// print("Code: {response.statusCode}");
|
||||
errorCode = response.statusCode.toString();
|
||||
errorBody = response.body;
|
||||
|
||||
@@ -206,7 +206,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"$errorCode: Error pulling Patients Data\n$endpoint\n$errorBody",
|
||||
"$errorCode: Error pulling Patients Data\n$endpoint${widget.userEmail}\n$errorBody",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
@@ -228,6 +228,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
void initState() {
|
||||
// errorCode = "";
|
||||
// errorBody = "";
|
||||
//print("patient manager page: ${widget.userEmail}");
|
||||
futurePatients = fetchPatients(endpoint + widget.userEmail);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -25,15 +25,21 @@ http {
|
||||
root /var/www/html;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
|
||||
# Web App
|
||||
location / {
|
||||
proxy_pass http://MIH-UX:83/;
|
||||
}
|
||||
|
||||
# API Hub
|
||||
location /api/ {
|
||||
proxy_pass http://MIH-API-Hub:8080/;
|
||||
}
|
||||
|
||||
#Minio storage
|
||||
location /files/ {
|
||||
proxy_pass http://MIH-Minio:9000/;
|
||||
}
|
||||
|
||||
location ~ /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user