uiowaSEP2024 / 002_ImagePro

Image processing backend
1 stars 0 forks source link

58 dockerizing frontend and backend #145

Closed Ivan-E-Johnson closed 5 months ago

Ivan-E-Johnson commented 5 months ago

Overview

This PR introduces Docker support for both the frontend and backend components of our project. By containerizing these elements, we enable their deployment on AWS ECS and EKS, facilitating easier deployment, scaling, and management.

Implementation

Docker compose Docker frontend Docker Backend

Testing

Manual testing to ensure

Problems Faced

We ran into so many problems with networking and cors

closes #58 closes #59

github-actions[bot] commented 5 months ago

Jest Coverage

Summary

Lines Statements Branches Functions
Coverage: 74%
74.87% (438/585) 57.14% (68/119) 68.57% (120/175)

Junit Summary

Tests Skipped Failures Errors Time
35 0 :zzz: 0 :x: 0 :fire: 3.824s :stopwatch:
Coverage Report (74%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files74.8757.1468.5774.25 
fixtures100100100100 
   kidneyStudyFixture.tsx100100100100 
src/components90.0944.4482.7591.17 
   ErrorMessageBox.tsx83.331000100 
   EventTimeline.tsx71.42007579–83
   Metadata.tsx85.7108084.6174–75
   Navbar.tsx90.475010090150, 163
   StackedChart.tsx10066.6610010072–85
   withAuthenticated.tsx100100100100 
src/contexts9010058.3389.28 
   authContext.tsx9010058.3389.2872, 90, 104
src/data30.0928.5739.4720 
   index.ts30.0928.5739.472017–27, 38–48, 56–66, 76–86, 98–107, 119–129, 139–148, 158–163, 175–198, 209–217, 227–232, 245–284, 300–301
src/hooks100100100100 
   useAuthContext.ts100100100100 
src/pages86.8477.4183.3387.5 
   analytics.tsx96.1510088.889690
   dashboard.tsx100100100100 
   index.tsx100100100100 
   login.tsx83.8788.8885.7183.3352–57, 109
   profile.tsx78.5766.667583.3363–66
   signup.tsx80.4857.1472.728065–67, 82–83, 163–170, 194
src/pages/apikeys73.2154.5464.2871.69 
   index.tsx73.2154.5464.2871.6974–77, 89, 94–99, 104–108, 195
src/pages/studies75.2347.2267.7478.12 
   [id].tsx68.5737.557.8971.4284, 93–107, 111–113, 124–125, 129, 133, 142, 218
   index.tsx88.5766.6683.3390.969, 78, 95
sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

powersaudrey25 commented 5 months ago

I am still seeing a CORS error Access to fetch at 'http://localhost:8000/users/' (redirected from 'http://localhost:8000/users') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

powersaudrey25 commented 5 months ago

I am still seeing a CORS error Access to fetch at 'http://localhost:8000/users/' (redirected from 'http://localhost:8000/users') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Changing environment:

Not sure if changing it back to backend was intended?

powersaudrey25 commented 5 months ago

I am still seeing a CORS error Access to fetch at 'http://localhost:8000/users/' (redirected from 'http://localhost:8000/users') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Changing environment: - NEXT_PUBLIC_BACKEND_URL=http://backend:8000 to environment: - NEXT_PUBLIC_BACKEND_URL=http://0.0.0.0:8000 fixed it.

Not sure if changing it back to backend was intended?

just had to rebuild, disregard