diff --git a/web/.dockerignore b/web/.dockerignore index 6054ff4c2..c5935792a 100644 --- a/web/.dockerignore +++ b/web/.dockerignore @@ -18,3 +18,5 @@ src/generated/node_modules src/generated/plugin/node_modules src/design-system/node_modules +src/apps/devdoc/node_modules +src/apps/devdoc/.next diff --git a/web/.github/workflows/build-container.yaml b/web/.github/workflows/build-container.yaml index cdeeb43f3..093041dda 100644 --- a/web/.github/workflows/build-container.yaml +++ b/web/.github/workflows/build-container.yaml @@ -21,6 +21,14 @@ jobs: app: - auth - console + - website + include: + - app: auth + dockerFile: Dockerfile + - app: console + dockerFile: Dockerfile + - app: website + dockerFile: Dockerfile.website runs-on: ubuntu-latest name: Deploy to Docker Image steps: @@ -47,5 +55,5 @@ jobs: branch_name=${GITHUB_REF#refs/heads/} version_string="v${branch_name#release-}-nightly" - docker build --build-arg APP=${{matrix.app}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:$version_string --push - docker build --build-arg APP=${{matrix.app}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:commit-${GITHUB_SHA} --push \ No newline at end of file + docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:$version_string --push + docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:commit-${GITHUB_SHA} --push \ No newline at end of file diff --git a/web/Dockerfile.website b/web/Dockerfile.website new file mode 100644 index 000000000..5f67f8eec --- /dev/null +++ b/web/Dockerfile.website @@ -0,0 +1,17 @@ +FROM node:20.8.1-alpine as node +WORKDIR /app + +COPY ./src/apps/devdoc ./src/apps/devdoc +COPY ./src/design-system/tailwind-base.js ./src/design-system/tailwind-base.js +COPY ./src/design-system/css-plugins ./src/design-system/css-plugins +COPY ./src/design-system/css ./src/design-system/css +COPY ./src/design-system/out ./src/design-system/out + +WORKDIR /app/src/apps/devdoc + +RUN npm i -g pnpm +RUN pnpm i -p + +RUN npm run build + +ENTRYPOINT pnpm start \ No newline at end of file diff --git a/web/Taskfile.yaml b/web/Taskfile.yaml index b0fb795b8..ba62b354c 100644 --- a/web/Taskfile.yaml +++ b/web/Taskfile.yaml @@ -35,7 +35,7 @@ tasks: case $(whoami) in "bikash") - URL_SUFFIX=1 + URL_SUFFIX="" ;; "vision") @@ -170,3 +170,12 @@ tasks: - docker push {{.IMAGE}}/auth:{{.tag}} - docker build --build-arg APP=console . -t {{.IMAGE}}/console:{{.tag}} - docker push {{.IMAGE}}/console:{{.tag}} + + docker-build-website: + preconditions: + - sh: '[[ -n "{{.tag}}" ]]' + msg: "var tag must have a value" + silent: false + cmds: + # - cd ./src/design-system && mkdir -p out && pnpm local:release + - docker buildx build . -t {{.tag}} -f Dockerfile.website