Skip to content

Commit

Permalink
Merge pull request #46 from kloudlite/features/design
Browse files Browse the repository at this point in the history
Features/design
  • Loading branch information
tulsiojha authored Dec 21, 2023
2 parents 5cd1de0 + 25fc1e7 commit d1cbb0d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
2 changes: 2 additions & 0 deletions web/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 10 additions & 2 deletions web/.github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
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
17 changes: 17 additions & 0 deletions web/Dockerfile.website
Original file line number Diff line number Diff line change
@@ -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
11 changes: 10 additions & 1 deletion web/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tasks:
case $(whoami) in
"bikash")
URL_SUFFIX=1
URL_SUFFIX=""
;;
"vision")
Expand Down Expand Up @@ -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

0 comments on commit d1cbb0d

Please sign in to comment.