Skip to content

Commit

Permalink
Modify application url to root (#250)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
shanice-skylight and pre-commit-ci[bot] authored Jan 8, 2025
1 parent 5aa8526 commit 780509a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
run: docker compose -f ./docker-compose-e2e.yaml up -d
- name: Poll until Query Connector is ready
run: |
until curl -s http://localhost:3000/query-connector; do
until curl -s http://localhost:3000/; do
echo "Waiting for Query Connector to be ready before running Playwright..."
sleep 5
done
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ecs_terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,9 @@ jobs:
-var "ersd_api_key=${ERSD_API_KEY}" \
-var "qc_tls_key=${TLS_KEY}" \
-var "qc_tls_cert=${TLS_CERT}"
terraform apply -auto-approve -replace="module.ecs.dockerless_remote_image.dibbs"
terraform apply -auto-approve -replace="module.ecs.dockerless_remote_image.dibbs[\"query-connector\"]" \
-var-file="$WORKSPACE.tfvars" \
-var "umls_api_key=${UMLS_API_KEY}" \
-var "ersd_api_key=${ERSD_API_KEY}" \
-var "qc_tls_key=${TLS_KEY}" \
-var "qc_tls_cert=${TLS_CERT}"
4 changes: 2 additions & 2 deletions query-connector/design-review/design-review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ git checkout $BRANCH_NAME
docker-compose build --no-cache && docker-compose up -d

# Wait for TEFCA Viewer to be available
URL="http://localhost:3000/query-connector"
URL="http://localhost:3000/"
while ! curl -s -o /dev/null -w "%{http_code}" "$URL" | grep -q "200"; do
echo "Waiting for $URL to be available..."
sleep 5
done


# Open in default browser
open http://localhost:3000/query-connector
open http://localhost:3000/

# Prompt to end review session
read -p "Press enter to end review"
Expand Down
11 changes: 2 additions & 9 deletions query-connector/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ const nextConfig = {
],
},
transpilePackages: ["yaml"],
async rewrites() {
return [
{
source: "/query-connector/:slug*",
destination: "/:slug*",
},
];
},

output: "standalone",
basePath: process.env.NODE_ENV === "production" ? "/query-connector" : "",
basePath: "",
};

module.exports = nextConfig;
3 changes: 1 addition & 2 deletions query-connector/playwright-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const TEST_URL =
process.env.TEST_ENV ?? "http://localhost:3000/query-connector";
export const TEST_URL = process.env.TEST_ENV ?? "http://localhost:3000/";
/**
*
*/
Expand Down
26 changes: 0 additions & 26 deletions query-connector/src/app/middleware.js

This file was deleted.

2 changes: 1 addition & 1 deletion query-connector/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function LandingPage() {
</div>
<Image
alt="Graphic illustrating what TEFCA is"
src="/query-connector/tefca-graphic.svg"
src="/tefca-graphic.svg"
width={250}
height={300}
priority
Expand Down
2 changes: 1 addition & 1 deletion query-connector/src/app/query/components/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function FooterComponent() {
<footer className={classNames("usa-footer", styles.footerContainer)}>
<div className={styles.cdcLogoContainer}>
<Image
src="/query-connector/CDC_logo.png"
src="/CDC_logo.png"
alt="CDC logo"
width={62}
height={36}
Expand Down
2 changes: 1 addition & 1 deletion query-connector/src/app/query/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function HeaderComponent() {
setShowMenu(!showMenu);
};
const isProduction = process.env.NODE_ENV === "production";
const backLink = isProduction ? "/query-connector" : "/";
const backLink = "/";

return (
<div className={styles.headerContainer}>
Expand Down
2 changes: 1 addition & 1 deletion query-connector/src/app/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function SigninPage() {
<Image
alt="Graphic illustrating what TEFCA is"
className={styles.image}
src="/query-connector/tefca-graphic.svg"
src="/tefca-graphic.svg"
width={474}
height={438}
priority
Expand Down

0 comments on commit 780509a

Please sign in to comment.