diff --git a/.env.development b/.env.development index f3faced6..244e84b3 100644 --- a/.env.development +++ b/.env.development @@ -1 +1,2 @@ -NEXT_PUBLIC_API_SERVER=http://localhost:9090/v1.0 +VITE_PUBLIC_API_SERVER=http://localhost:9090/v1.0 +VITE_BASE_PATH=/ \ No newline at end of file diff --git a/.env.production b/.env.production index f3faced6..0ac1ec28 100644 --- a/.env.production +++ b/.env.production @@ -1 +1,2 @@ -NEXT_PUBLIC_API_SERVER=http://localhost:9090/v1.0 +VITE_PUBLIC_API_SERVER=http://localhost:9090/v1.0 +VITE_BASE_PATH=/ diff --git a/.eslintrc.json b/.eslintrc.json index 2cd929a8..02c2107e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,27 @@ { - "plugins": ["react", "prettier"], - "extends": ["next/core-web-vitals", "prettier"] + "env": { + "browser": true, + "es2021": true + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/jsx-runtime" + ], + "overrides": [], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": ["react", "@typescript-eslint"], + "rules": { + "@typescript-eslint/no-explicit-any": "off" + }, + "settings": { + "react": { + "version": "detect" + } + } } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef3a8f98..6e0d4d0f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + BRANCH: ${{ github.ref_name }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -44,7 +45,7 @@ jobs: run: yarn prettier --check . - name: Build distribution - run: yarn build-static + run: yarn build - name: Docker meta diff --git a/.gitignore b/.gitignore index 598ed0ae..dcf4b4da 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ db /specification.yml .vscode tsconfig.tsbuildinfo +dist diff --git a/.prettierignore b/.prettierignore index 18bbfe4b..745da351 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,6 +3,7 @@ .github node_modules out +dist public tmp openapi diff --git a/Dockerfile b/Dockerfile index bf9c751d..adb35304 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM nginx -COPY ./out /usr/share/nginx/html +COPY ./dist /usr/share/nginx/html COPY ./docker-entrypoint.sh /docker-entrypoint.d COPY ./nginx-spa.conf /etc/nginx/conf.d/default.conf diff --git a/Dockerfile.nextjs b/Dockerfile.nextjs deleted file mode 100644 index 9b32bb13..00000000 --- a/Dockerfile.nextjs +++ /dev/null @@ -1,32 +0,0 @@ -FROM node:16-bullseye AS deps -WORKDIR /app -COPY package.json yarn.lock ./ -RUN yarn install --frozen-lockfile --network-timeout 100000 - -FROM node:16-bullseye AS builder -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY . . - -RUN yarn build - -FROM node:16-bullseye -RUN mkdir /app - -WORKDIR /app - -COPY --from=builder /app/node_modules/ node_modules -COPY --from=builder /app/.next/ .next -COPY package.json . -COPY ./docker-entrypoint.sh / - -RUN addgroup --system user && adduser --system --group user -RUN chown -R user:user /app/.next - -USER user -EXPOSE 3000 -ENV API_URL=http://localhost:9090/v1.0 - -ENTRYPOINT ["/docker-entrypoint.sh"] - -CMD [ "yarn", "start" ] diff --git a/index.html b/index.html new file mode 100644 index 00000000..ca3ab5f2 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + +
+ + + +