-
Notifications
You must be signed in to change notification settings - Fork 225
Migrate to Nuxt 3 #4257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to Nuxt 3 #4257
Changes from all commits
59069ef
e436520
62ef6e5
77e4d12
5203c85
037ef41
98be01e
04dc8a9
4e313af
9173206
ae3c779
ff94ae7
96e91e6
c087892
527f17f
cb5a6fc
d526eb3
27170af
3715639
b7f3d0b
23fa6bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,10 +294,10 @@ jobs: | |
- name: Setup CI env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
# Python is not needed to run the tests. | ||
setup_python: false | ||
# Node.js is needed by lint actions. | ||
install_recipe: "node-install" | ||
setup_python: true | ||
# Node.js is not needed to run the tests. | ||
setup_nodejs: false | ||
install_recipe: "" | ||
|
||
- name: Load Docker images | ||
uses: ./.github/actions/load-img | ||
|
@@ -796,14 +796,11 @@ jobs: | |
name: | ||
- playwright_vr | ||
- playwright_e2e | ||
- storybook | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll either need to remove this as a required job from the repo configuration (in Terraform) or, another option would be to break storybook out of the |
||
include: | ||
- name: playwright_vr | ||
script: "test:playwright visual-regression -u" | ||
- name: playwright_e2e | ||
script: "test:playwright e2e" | ||
- name: storybook | ||
script: "test:storybook -u" | ||
|
||
steps: | ||
- name: Checkout repository | ||
|
@@ -866,7 +863,6 @@ jobs: | |
name: | ||
- playwright_vr | ||
- playwright_e2e | ||
- storybook | ||
|
||
steps: | ||
- name: Pass | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,8 +61,8 @@ repos: | |
# Must include any plugins defined in prettier.config.js, along with TypeScript and Prettier themselves | ||
# Versions must be manually kept in sync with those in the pnpm-lock.yaml file to prevent drift. | ||
additional_dependencies: | ||
- prettier@3.2.5 | ||
- prettier-plugin-tailwindcss@0.5.14 | ||
- prettier@3.3.2 | ||
- prettier-plugin-tailwindcss@0.6.5 | ||
- [email protected] | ||
|
||
- repo: https://github.com/koalaman/shellcheck-precommit | ||
|
@@ -119,7 +119,7 @@ repos: | |
- id: types | ||
name: types | ||
files: ^(frontend|packages/js)/.*$ | ||
entry: bash -c 'pnpm run -r types' | ||
entry: bash -c 'pnpm run prepare:nuxt && pnpm run -r types' | ||
language: system | ||
pass_filenames: false | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,58 @@ | ||
#API_URL=http://127.17.0.1:8000/ | ||
#API_CLIENT_ID="" | ||
#API_CLIENT_SECRET="" | ||
PORT=8443 | ||
|
||
# ---------------------------- # | ||
# REQUIRED LOCAL ENV VARIABLES # | ||
# ---------------------------- # | ||
# DEPLOYMENT_ENV=local | ||
# SITE_DOMAIN=localhost | ||
# SITE_URL=http://localhost:8443 | ||
#/** | ||
#* We rely on the Nginx container running as `frontend_nginx` | ||
#* in the local compose stack to proxy requests. Therefore, the | ||
#* URL here is not for the Plausible container in the local stack, | ||
#* but the Nginx service, which then itself forwards the requests | ||
#* to the local Plausible instance. | ||
#* | ||
#* In production, the Nginx container is handling all requests | ||
#* made to the root URL (openverse.org), and is configured to | ||
#* forward Plausible requests to upstream Plausible. | ||
#*/ | ||
# PLAUSIBLE_SITE_URL = http://localhost:50290 | ||
|
||
# ---------------------------- # | ||
# OPTIONAL LOCAL ENV VARIABLES | ||
# ---------------------------- # | ||
### API settings | ||
|
||
# NUXT_PUBLIC_API_URL=http://127.17.0.1:8000/ # local dev API | ||
# NUXT_PUBLIC_API_URL=http://localhost:49153/ # talkback proxy | ||
# NUXT_PUBLIC_API_URL=https://api.openverse.org/# prod API | ||
|
||
# NUXT_API_CLIENT_ID="" | ||
# NUXT_API_CLIENT_SECRET="" | ||
|
||
# -------------------- # | ||
# PRODUCTION VARIABLES # | ||
# -------------------- # | ||
# DEPLOYMENT_ENV=production | ||
# NUXT_API_CLIENT_ID="" | ||
# NUXT_API_CLIENT_SECRET="" | ||
# NUXT_PUBLIC_API_URL=https://api.openverse.org/ | ||
# NUXT_PUBLIC_SENTRY_DSN="" | ||
# NUXT_PUBLIC_SENTRY_RELEASE="" | ||
# SITE_URL=https://openverse.org | ||
# SITE_DOMAIN=openverse.org | ||
# PLAUSIBLE_SITE_URL=https://openverse.org | ||
|
||
# ----------------- # | ||
# STAGING VARIABLES # | ||
# ----------------- # | ||
# DEPLOYMENT_ENV=staging | ||
# NUXT_API_CLIENT_ID="" | ||
# NUXT_API_CLIENT_SECRET="" | ||
# NUXT_PUBLIC_API_URL=https://api-staging.openverse.org/ | ||
# NUXT_PUBLIC_SENTRY_DSN="" | ||
# NUXT_PUBLIC_SENTRY_RELEASE="" | ||
# SITE_URL=https://staging.openverse.org | ||
# SITE_DOMAIN=staging.openverse.org | ||
# PLAUSIBLE_SITE_URL=https://staging.openverse.org |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,7 @@ WORKDIR /home/node/ | |
# Copy monorepo mocking files into `/home/node`, which pretends to be the monorepo root. | ||
# Note: these files must be manually un-ignored in the root .dockerignore | ||
# hadolint ignore=DL3022 | ||
COPY --from=repo_root --chown=node:node .npmrc .pnpmfile.cjs pnpm-lock.yaml tsconfig.base.json ./ | ||
|
||
COPY --from=repo_root --chown=node:node .npmrc .pnpmfile.cjs pnpm-lock.yaml ./ | ||
RUN echo '{"packages":["frontend/"]}' > pnpm-workspace.yaml | ||
|
||
# Copy the `frontend/` directory into `/home/node/frontend`, as a package in the monorepo. | ||
|
@@ -40,9 +39,12 @@ RUN pnpm install && pnpm i18n | |
# disable telemetry when building the app | ||
ENV NUXT_TELEMETRY_DISABLED=1 | ||
ENV NODE_ENV=production | ||
ENV SENTRY_DSN=https://[email protected]/5799642 | ||
ENV NUXT_PUBLIC_SENTRY_DSN=https://[email protected]/5799642 | ||
|
||
ARG API_URL | ||
ARG API_URL=https://api.openverse.org/ | ||
ENV NUXT_PUBLIC_API_URL=$API_URL | ||
# Increase memory limit for the build process (necessary for i18n routes) | ||
ENV NODE_OPTIONS="--max_old_space_size=4096" | ||
|
||
RUN pnpm build | ||
|
||
|
@@ -67,7 +69,12 @@ COPY --from=builder --chown=node:node /home/node/frontend ./frontend/ | |
WORKDIR /home/node/frontend/ | ||
|
||
ARG SEMANTIC_VERSION | ||
ENV SENTRY_RELEASE=$SEMANTIC_VERSION | ||
ARG DEPLOYMENT_ENV=production | ||
ARG API_URL=https://api.openverse.org/ | ||
|
||
ENV NUXT_PUBLIC_API_URL=$API_URL | ||
ENV NUXT_PUBLIC_SENTRY_RELEASE=$SEMANTIC_VERSION | ||
ENV NUXT_PUBLIC_SENTRY_ENVIRONMENT=$DEPLOYMENT_ENV | ||
|
||
# set app serving to permissive / assigned | ||
ENV NUXT_HOST=0.0.0.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,15 @@ services: | |
args: | ||
- PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION} | ||
volumes: | ||
- ../node_modules:/node_modules | ||
- .:/frontend | ||
- ${PWD}/../tsconfig.base.json:/tsconfig.base.json | ||
- ../node_modules:/node_modules:rw,Z | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a note that we might need to do the same host-pnpm-cache mounting as we do in |
||
- .:/frontend:rw,Z | ||
user: ${USER_ID} | ||
working_dir: /frontend | ||
command: pnpm ${TEST_COMMAND} ${PLAYWRIGHT_ARGS:-} | ||
entrypoint: > | ||
/bin/sh -c ' | ||
pnpm install; | ||
pnpm ${TEST_COMMAND} ${PLAYWRIGHT_ARGS:-}; | ||
' | ||
environment: | ||
# This makes the webserver that Playwright runs show the build | ||
- DEBUG=pw:webserver | ||
|
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.