diff --git a/.env b/.env index 711f4c0..9200827 100644 --- a/.env +++ b/.env @@ -17,5 +17,5 @@ GOOSE_DBSTRING='user=postgres dbname=postgres sslmode=disable' GOOSE_MIGRATION_DIR=migrations # SPA on VUE.js -INNERPORT=8088 +INNERPORT=80 OUTERPORT=8088 \ No newline at end of file diff --git a/README.md b/README.md index 286daf3..c508e6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # RESTfull API on Golang. + +make + for build and start app. Before your are must set .env settings. + TODO LIST *Настроить авторизацию по уровню доступа. diff --git a/docker-compose.yaml b/docker-compose.yaml index cc312f7..8eb597b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -47,7 +47,7 @@ services: env_file: - .env ports: - - "${INNERPORT}:${OUTERPORT}" + - "${OUTERPORT}:${INNERPORT}" depends_on: - api - db diff --git a/spa/.dockerignore b/spa/.dockerignore deleted file mode 100644 index badad05..0000000 --- a/spa/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.git -.DS_Store -dist \ No newline at end of file diff --git a/spa/.gitignore b/spa/.gitignore index 403adbc..8ee54e8 100644 --- a/spa/.gitignore +++ b/spa/.gitignore @@ -1,23 +1,30 @@ -.DS_Store -node_modules -/dist - - -# local env files -.env.local -.env.*.local - -# Log files +# Logs +logs +*.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ # Editor directories and files +.vscode/* +!.vscode/extensions.json .idea -.vscode *.suo *.ntvs* *.njsproj *.sln *.sw? + +*.tsbuildinfo diff --git a/spa/Dockerfile b/spa/Dockerfile index 20f93f5..1e40735 100644 --- a/spa/Dockerfile +++ b/spa/Dockerfile @@ -1,12 +1,19 @@ -# Dockerfile для Vue.js -FROM node:lts-alpine as build-stage +# Используем Node.js LTS версию в качестве базового образа +FROM node:lts-alpine as builder + +# Устанавливаем зависимости WORKDIR /app COPY package*.json ./ RUN npm install + +# Копируем исходный код COPY . . + +# Строим продакшн-версию приложения RUN npm run build -FROM nginx:stable-alpine -COPY --from=build-stage /app/dist /usr/share/nginx/html -EXPOSE ${OUTERPORT} +# Создаем финальный образ на основе Nginx +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/spa/README.md b/spa/README.md index b2ca9eb..0506020 100644 --- a/spa/README.md +++ b/spa/README.md @@ -1,24 +1,29 @@ # spa -## Project setup -``` +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). + +## Customize configuration + +See [Vite Configuration Reference](https://vite.dev/config/). + +## Project Setup + +```sh npm install ``` -### Compiles and hot-reloads for development -``` -npm run serve +### Compile and Hot-Reload for Development + +```sh +npm run dev ``` -### Compiles and minifies for production -``` +### Compile and Minify for Production + +```sh npm run build ``` - -### Lints and fixes files -``` -npm run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/spa/babel.config.js b/spa/babel.config.js deleted file mode 100644 index e955840..0000000 --- a/spa/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] -} diff --git a/spa/index.html b/spa/index.html new file mode 100644 index 0000000..b19040a --- /dev/null +++ b/spa/index.html @@ -0,0 +1,13 @@ + + +
+ + + +
-
- For a guide and recipes on how to configure / customize this project,
- check out the
- vue-cli documentation.
-
README.md.
+