-
Notifications
You must be signed in to change notification settings - Fork 0
added vuejs code #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| .DS_Store | ||
| node_modules | ||
| /dist | ||
|
|
||
|
|
||
| # local env files | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
| # Log files | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
|
|
||
| # Editor directories and files | ||
| .idea | ||
| .vscode | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "tabWidth": 2, | ||
| "useTabs": false, | ||
| "semi": true, | ||
| "singleQuote": false, | ||
| "printWidth": 100, | ||
| "arrayExpand": true | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # # Build stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # FROM node:16 as build-stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # WORKDIR /app | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # COPY package*.json ./ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # RUN yarn | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # COPY . . | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # RUN yarn build | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # # Production stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # FROM nginx:stable-alpine as production-stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # COPY --from=build-stage /app/dist /usr/share/nginx/html | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # COPY nginx.conf /etc/nginx/conf.d/default.conf | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # # Create a startup script | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # RUN echo '#!/bin/sh' > /docker-entrypoint.d/00-update-port.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # echo 'sed -i "s/listen 8080/listen $PORT/g" /etc/nginx/conf.d/default.conf' >> /docker-entrypoint.d/00-update-port.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # chmod +x /docker-entrypoint.d/00-update-port.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # EXPOSE 8080 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # CMD ["nginx", "-g", "daemon off;"] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+20
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. The Dockerfile contains commented-out code at the top that duplicates the actual implementation, and redundant commented EXPOSE and CMD directives at the bottom that should be removed.
Comment on lines
+1
to
+20
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. style: Remove legacy commented-out build/stage code for clarity.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Build stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM node:16 as build-stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| WORKDIR /app | ||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY package*.json ./ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN yarn | ||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY . . | ||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN yarn build | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Production stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM nginx:stable-alpine as production-stage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY --from=build-stage /app/dist /usr/share/nginx/html | ||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY nginx.conf /etc/nginx/conf.d/default.conf | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Add a startup script for debugging | ||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN echo '#!/bin/sh' > /start.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo 'nginx -g "daemon off;"' >> /start.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| chmod +x /start.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+40
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. Suggestion: Update the startup script to modify the nginx configuration with sed so that the dynamic port is applied. [possible bug]
Suggested change
Comment on lines
+35
to
+40
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. The startup script doesn't dynamically update the nginx configuration to use the 📝 Committable Code Suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| EXPOSE 8080 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| CMD ["/start.sh"] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # EXPOSE 8080 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # CMD ["nginx", "-g", "daemon off;"] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,25 @@ | ||
| # {{ Project Name }} | ||
| # auth-app | ||
|
|
||
| {{ Brief description of the project }} | ||
| ## Project setup | ||
| ``` | ||
| yarn install | ||
| ``` | ||
|
|
||
| ## Overview | ||
| This repository is created from Ollion's standard template to ensure best practices. | ||
| ### Compiles and hot-reloads for development | ||
| ``` | ||
| yarn serve | ||
| ``` | ||
|
|
||
| ## Installation | ||
| {{ Instructions on how to install the project }} | ||
| ### Compiles and minifies for production | ||
| ``` | ||
| yarn build | ||
| ``` | ||
|
|
||
| ## Usage | ||
| {{ How to use the project }} | ||
| ### Lints and fixes files | ||
| ``` | ||
| yarn lint | ||
| ``` | ||
|
|
||
| ## Using this Template | ||
| 1. When creating a new repository on GitHub, select "Choose a template" and pick `ollionorg/private-repository-creation` from the list. | ||
| 2. Enter your repository name (e.g., "my-new-repository"). | ||
| 3. Set visibility to "Private". | ||
| 4. Do not check "Include all branches". | ||
| 5. Click "Create repository. | ||
|
|
||
| ## Post-Creation Setup | ||
| - After creating your repository from private-repository-creation template, you can enable branch protection for the `main` branch by manually triggering the included workflow: | ||
| - Go to the **Actions** tab, select **Set Branch Protection**, and click **Run workflow** > **Run workflow** to apply the protection rules, which are configured by the workflow. | ||
| - After the workflow completes successfully, verify in **Settings** > **Branches** that `main` has: | ||
| - Pull request required (1 approval) | ||
| - Conversation resolution required | ||
| - Signed commits required | ||
| - Customize this README: Replace `[Project Name]`, `[Brief description of the project]`, and update `Installation` and `Usage` sections as needed. Modify other files if required. | ||
|
|
||
| ## Note: GPG Signing and Repository Creation | ||
| - The branch protection rules mandate commit signatures. Set up GPG signing in your Git client by following this [Confluence guide](https://ollion.atlassian.net/wiki/spaces/CID/pages/2989687222/Signed+Commits+on+Github). | ||
| - For detailed instructions on creating a repository with this template, refer to this [Confluence guide](https://ollion.atlassian.net/wiki/spaces/CID/pages/4123131980/Github+Repository+creation+using+template). | ||
| ### Customize configuration | ||
| See [Configuration Reference](https://cli.vuejs.org/config/). | ||
|  |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module.exports = { | ||
| presets: ["@vue/cli-plugin-babel/preset"], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| server { | ||
| listen 8080 default_server; | ||
| server_name localhost; | ||
|
|
||
| location / { | ||
| root /usr/share/nginx/html; | ||
| index index.html index.htm; | ||
| try_files $uri $uri/ /index.html =404; | ||
| } | ||
|
|
||
| # Additional helpful configurations | ||
| gzip on; | ||
| gzip_types text/plain text/css application/json application/javascript; | ||
| client_max_body_size 10M; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||||||||
| { | ||||||||||
| "name": "auth-app", | ||||||||||
| "version": "0.1.0", | ||||||||||
| "private": true, | ||||||||||
| "scripts": { | ||||||||||
| "serve": "vue-cli-service serve", | ||||||||||
| "build": "vue-cli-service build", | ||||||||||
| "lint": "vue-cli-service lint" | ||||||||||
| }, | ||||||||||
| "dependencies": { | ||||||||||
| "@vuelidate/core": "^2.0.3", | ||||||||||
| "@vuelidate/validators": "^2.0.4", | ||||||||||
| "axios": "^1.7.9", | ||||||||||
| "core-js": "^3.8.3", | ||||||||||
|
Comment on lines
+13
to
+14
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. Upgrade axios ‑ current version is flagged as vulnerable (CVE‑2025‑27152). Your - "axios": "^1.7.9",
+ "axios": "^1.8.2",📝 Committable suggestion
Suggested change
|
||||||||||
| "pinia": "^3.0.1", | ||||||||||
| "vue": "^3.2.13", | ||||||||||
| "vue-router": "^4.0.3", | ||||||||||
| "vuex": "^4.0.0" | ||||||||||
| }, | ||||||||||
| "devDependencies": { | ||||||||||
| "@typescript-eslint/eslint-plugin": "^5.4.0", | ||||||||||
| "@typescript-eslint/parser": "^5.4.0", | ||||||||||
| "@vue/cli-plugin-babel": "~5.0.0", | ||||||||||
| "@vue/cli-plugin-eslint": "~5.0.0", | ||||||||||
| "@vue/cli-plugin-router": "~5.0.0", | ||||||||||
| "@vue/cli-plugin-typescript": "~5.0.0", | ||||||||||
| "@vue/cli-plugin-vuex": "~5.0.0", | ||||||||||
| "@vue/cli-service": "~5.0.0", | ||||||||||
| "@vue/eslint-config-typescript": "^9.1.0", | ||||||||||
| "eslint": "^7.32.0", | ||||||||||
| "eslint-config-prettier": "^8.3.0", | ||||||||||
| "eslint-plugin-prettier": "^4.0.0", | ||||||||||
| "eslint-plugin-vue": "^8.0.3", | ||||||||||
| "prettier": "^2.4.1", | ||||||||||
| "typescript": "~4.5.5" | ||||||||||
| }, | ||||||||||
| "eslintConfig": { | ||||||||||
| "root": true, | ||||||||||
| "env": { | ||||||||||
| "node": true | ||||||||||
| }, | ||||||||||
| "extends": [ | ||||||||||
| "plugin:vue/vue3-essential", | ||||||||||
| "eslint:recommended", | ||||||||||
| "@vue/typescript/recommended", | ||||||||||
| "plugin:prettier/recommended" | ||||||||||
| ], | ||||||||||
| "parserOptions": { | ||||||||||
| "ecmaVersion": 2020 | ||||||||||
| }, | ||||||||||
| "rules": {} | ||||||||||
| }, | ||||||||||
| "browserslist": [ | ||||||||||
| "> 1%", | ||||||||||
| "last 2 versions", | ||||||||||
| "not dead", | ||||||||||
| "not ie 11" | ||||||||||
| ] | ||||||||||
| } | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: "arrayExpand" is non-standard. Verify if supported or necessary.