diff --git a/docker-compose.yml b/docker-compose.yml index 7d50b67855..c76af7d316 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: command: ["start"] environment: - PORT=3000 - - PROJECT_ASSET_PREFIX=http://localhost:3000 + - PROJECT_ASSET_PREFIX=http://localhost:3000/projects - NODE_ENV=production - PANOPTES_ENV=production - NEXT_TELEMETRY_DISABLED=1 @@ -39,7 +39,7 @@ services: command: ["start"] environment: - PORT=3000 - - CONTENT_ASSET_PREFIX=http://localhost:3001 + - CONTENT_ASSET_PREFIX=http://localhost:3001/about - NODE_ENV=production - PANOPTES_ENV=production - NEXT_TELEMETRY_DISABLED=1 diff --git a/kubernetes/deployment-production.tmpl b/kubernetes/deployment-production.tmpl index bb5d024e30..4a1ff92679 100644 --- a/kubernetes/deployment-production.tmpl +++ b/kubernetes/deployment-production.tmpl @@ -61,7 +61,7 @@ spec: - containerPort: 3000 env: - name: PROJECT_ASSET_PREFIX - value: https://fe-project.zooniverse.org + value: https://fe-project.zooniverse.org/projects - name: COMMIT_ID value: __IMAGE_TAG__ - name: NEWRELIC_LICENSE_KEY @@ -153,7 +153,7 @@ spec: - containerPort: 3000 env: - name: CONTENT_ASSET_PREFIX - value: https://fe-content-pages.zooniverse.org + value: https://fe-content-pages.zooniverse.org/about - name: COMMIT_ID value: __IMAGE_TAG__ - name: CONTENTFUL_ACCESS_TOKEN diff --git a/kubernetes/deployment-staging.tmpl b/kubernetes/deployment-staging.tmpl index 37ad591101..6f1c32f089 100644 --- a/kubernetes/deployment-staging.tmpl +++ b/kubernetes/deployment-staging.tmpl @@ -51,7 +51,7 @@ spec: - containerPort: 3000 env: - name: PROJECT_ASSET_PREFIX - value: https://fe-project.preview.zooniverse.org + value: https://fe-project.preview.zooniverse.org/projects - name: COMMIT_ID value: __IMAGE_TAG__ - name: NEWRELIC_LICENSE_KEY @@ -135,7 +135,7 @@ spec: - containerPort: 3000 env: - name: CONTENT_ASSET_PREFIX - value: https://fe-content-pages.preview.zooniverse.org + value: https://fe-content-pages.preview.zooniverse.org/about - name: COMMIT_ID value: __IMAGE_TAG__ - name: CONTENTFUL_ACCESS_TOKEN diff --git a/packages/app-content-pages/next.config.js b/packages/app-content-pages/next.config.js index 6d10e173af..ea1a715e31 100644 --- a/packages/app-content-pages/next.config.js +++ b/packages/app-content-pages/next.config.js @@ -29,6 +29,7 @@ const COMMIT_ID = process.env.COMMIT_ID || commitID() const nextConfig = { assetPrefix, + basePath: '/about', env: { COMMIT_ID, diff --git a/packages/app-content-pages/pages/about/publications.js b/packages/app-content-pages/pages/about/publications.js deleted file mode 100644 index 1deaa77b67..0000000000 --- a/packages/app-content-pages/pages/about/publications.js +++ /dev/null @@ -1 +0,0 @@ -export { default, getStaticProps } from '../../src/screens/Publications' diff --git a/packages/app-content-pages/pages/about/team.js b/packages/app-content-pages/pages/about/team.js deleted file mode 100644 index acb44759fa..0000000000 --- a/packages/app-content-pages/pages/about/team.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default, getStaticProps } from '../../src/screens/Team' - - diff --git a/packages/app-content-pages/pages/publications.js b/packages/app-content-pages/pages/publications.js new file mode 100644 index 0000000000..5cc70a8be0 --- /dev/null +++ b/packages/app-content-pages/pages/publications.js @@ -0,0 +1 @@ +export { default, getStaticProps } from '../src/screens/Publications' diff --git a/packages/app-content-pages/pages/team.js b/packages/app-content-pages/pages/team.js new file mode 100644 index 0000000000..cf4cad192f --- /dev/null +++ b/packages/app-content-pages/pages/team.js @@ -0,0 +1,3 @@ +export { default, getStaticProps } from '../src/screens/Team' + + diff --git a/packages/app-project/next.config.js b/packages/app-project/next.config.js index b6286d90cd..cd321d690b 100644 --- a/packages/app-project/next.config.js +++ b/packages/app-project/next.config.js @@ -19,9 +19,10 @@ function commitID () { } } +const basePath = '/projects' const PANOPTES_ENV = process.env.PANOPTES_ENV || 'staging' const webpackConfig = require('./webpack.config') -const assetPrefix = process.env.PROJECT_ASSET_PREFIX || '' +const assetPrefix = process.env.PROJECT_ASSET_PREFIX || basePath const SENTRY_PROJECT_DSN = process.env.SENTRY_PROJECT_DSN const APP_ENV = process.env.APP_ENV || 'production' const COMMIT_ID = process.env.COMMIT_ID || commitID() @@ -30,6 +31,7 @@ console.info(PANOPTES_ENV, talkHosts[PANOPTES_ENV]) const nextConfig = { assetPrefix, + basePath, env: { COMMIT_ID, diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/education.js b/packages/app-project/pages/[owner]/[project]/about/education.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/education.js rename to packages/app-project/pages/[owner]/[project]/about/education.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/faq.js b/packages/app-project/pages/[owner]/[project]/about/faq.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/faq.js rename to packages/app-project/pages/[owner]/[project]/about/faq.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/index.js b/packages/app-project/pages/[owner]/[project]/about/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/index.js rename to packages/app-project/pages/[owner]/[project]/about/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/research.js b/packages/app-project/pages/[owner]/[project]/about/research.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/research.js rename to packages/app-project/pages/[owner]/[project]/about/research.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/results.js b/packages/app-project/pages/[owner]/[project]/about/results.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/results.js rename to packages/app-project/pages/[owner]/[project]/about/results.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/about/team.js b/packages/app-project/pages/[owner]/[project]/about/team.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/about/team.js rename to packages/app-project/pages/[owner]/[project]/about/team.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/classify/index.js b/packages/app-project/pages/[owner]/[project]/classify/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/classify/index.js rename to packages/app-project/pages/[owner]/[project]/classify/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/index.js b/packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/index.js rename to packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/index.js b/packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/index.js rename to packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/subject/[subjectID]/index.js b/packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/subject/[subjectID]/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/subject/[subjectID]/index.js rename to packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/subject/[subjectID]/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject/[subjectID]/index.js b/packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject/[subjectID]/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/subject/[subjectID]/index.js rename to packages/app-project/pages/[owner]/[project]/classify/workflow/[workflowID]/subject/[subjectID]/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/index.js b/packages/app-project/pages/[owner]/[project]/index.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/index.js rename to packages/app-project/pages/[owner]/[project]/index.js diff --git a/packages/app-project/pages/projects/[owner]/[project]/logger.js b/packages/app-project/pages/[owner]/[project]/logger.js similarity index 100% rename from packages/app-project/pages/projects/[owner]/[project]/logger.js rename to packages/app-project/pages/[owner]/[project]/logger.js