diff --git a/client-default.conf b/client-default.conf new file mode 100644 index 0000000..b4ff928 --- /dev/null +++ b/client-default.conf @@ -0,0 +1,14 @@ +server { + listen 80; + server_name _; + + location / { + root /usr/share/nginx/html; + try_files $uri /index.html; # this is the magic line + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file diff --git a/dockerfile b/dockerfile index c9d62b8..2981fdb 100644 --- a/dockerfile +++ b/dockerfile @@ -12,5 +12,6 @@ FROM nginx:alpine WORKDIR /usr/share/nginx/ RUN rm -rf html RUN mkdir html +COPY client-default.conf /etc/nginx/conf.d/default.conf COPY --from=myapp /moviesearchfrontend/dist /usr/share/nginx/html \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index 1912013..c7afaa3 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -12,8 +12,8 @@ const oidcConfig: AuthProviderProps = { authority: "https://auth.snowse.duckdns.org/realms/advanced-frontend/", client_id: "bryce-oAuth2", redirect_uri: - // "https://moviesearch.duckdns.org/", - "http://localhost:5173/", + "https://moviesearch.duckdns.org/", + // "http://localhost:5173/", onSigninCallback: () => { const url = window.location.protocol +