diff --git a/azure-pipeline/build_frontend.yml b/azure-pipeline/build_frontend.yml index e17e212..abebda1 100644 --- a/azure-pipeline/build_frontend.yml +++ b/azure-pipeline/build_frontend.yml @@ -23,7 +23,7 @@ jobs: - task: NodeTool@0 displayName: "Node.js Version" inputs: - versionSpec: "22.x" + versionSpec: "24.13.x" - script: | cd frontend diff --git a/frontend/.gitattributes b/frontend/.gitattributes new file mode 100644 index 0000000..89e7a58 --- /dev/null +++ b/frontend/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff --git a/frontend/.gitignore b/frontend/.gitignore index 98e16bb..e75db27 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -13,6 +13,7 @@ dist dist-ssr *.local .env +.yarn/ # Editor directories and files .vscode/* diff --git a/frontend/.nvmrc b/frontend/.nvmrc new file mode 100644 index 0000000..9173612 --- /dev/null +++ b/frontend/.nvmrc @@ -0,0 +1 @@ +v24.13 diff --git a/frontend/README.md b/frontend/README.md index 4062b95..f907a9f 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -10,16 +10,26 @@ To run on windows, use docker. 2. Run `docker compose up -d` 3. Navigate to http://localhost:8000/ -Note: If you change your environment variables in .env, you will have to rebuild the container to see the changes using the `docker compose up --build -d` command. +> [!NOTE] +> +> The port in step 3 should match the `VITE_PORT` value in your `.env` file. -To see the logs directly in your console, you can remove the -d flag. Otherwise, you can view output in Docker Desktop. + +> [!TIP] +> +> If you change your environment variables in `.env`, you will have to rebuild the container to see the changes using +> the `docker compose up --build -d` command. + +To see the logs directly in your console, you can remove the `-d` flag. Otherwise, you can view output in Docker Desktop. ## Update locale files Pull key:value from google sheets to create json file. `https://docs.google.com/spreadsheets/d/1Kk8OIOhXxzyMA3ZgyiIiQtdwJNBJvGaUTNsarYHcFsM/` -> **IMPORTANT** Please create a new google sheet for each new project. Do not use this one for one of your projects +> [!IMPORTANT] +> +> Please create a new Google Sheet for each new project. Do not use this one for one of your projects Run `yarn sheet2i18n` to update your local keys with what is in the spreadsheet. diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.yml index c61faae..6ed02b3 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.yml @@ -1,16 +1,15 @@ -version: "3.4" +# please change the name so it matches your project name +name: web-react-skeleton services: - vite_docker: - image: node:20.11.1 - container_name: vite_docker + vite: + image: node:24.13-slim env_file: - .env entrypoint: /srv/app/entrypoint.sh ports: - - 8000:8000 + - "${VITE_PORT:-8000}:${VITE_PORT:-8000}" working_dir: /srv/app volumes: - type: bind source: ./ target: /srv/app - tty: true diff --git a/frontend/entrypoint.sh b/frontend/entrypoint.sh old mode 100644 new mode 100755 diff --git a/frontend/example.env b/frontend/example.env old mode 100755 new mode 100644 index 1b52056..ae1b86c --- a/frontend/example.env +++ b/frontend/example.env @@ -1,4 +1,4 @@ -VITE_PORT=8080 +VITE_PORT=8000 VITE_GENERATE_SOURCEMAP=true VITE_ENV=local VITE_VERSION_NUMBER=v0.0.1