mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:17:35 +00:00
feat(console): integrate frontend (#95)
* feat: console frontend * chore(dependabot): cycle and npm * chore: rename citadel to zitadel, remove generated files * chore: delete go files * chore(frontend): ci steps * chore: remove docker and envoy files * chore: remove docker file * chore: working dir * chore: run proto build * add console start * chore: restructure folders * chore: remove gui build * statikFs * generate proto for console * add statik import * import * chore: try statik * chore: path * chore: path * chore: script in root * chore: order build steps * chore: go get * chore: folder traversal * chore: non empty test file * chore: gitignore * chore: gitignore * chore: statik path * chore: switch to failing FE build * fix: build * fix: project-grant-test * fix: rm test * add statik.go * go mod tidy * chore: place test, seperate test from build * chore: lint all the world * chore: ci the world instead * chore: tune docker * chore: undo container test * chore: fix run * chore: docker build * chore: test docker build * chore: go build flags * finaly * fix caos_local * go mod Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
5
build/build.md
Normal file
5
build/build.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Build
|
||||
|
||||
## Console
|
||||
|
||||
## Docker
|
46
build/console/generate-grpc.sh
Executable file
46
build/console/generate-grpc.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
GEN_PATH=${GOPATH}/src/github.com/caos/zitadel/console/src/app/proto/generated
|
||||
|
||||
echo "Remove old files"
|
||||
rm -rf $GEN_PATH
|
||||
|
||||
echo "Create folders"
|
||||
mkdir -p $GEN_PATH
|
||||
|
||||
echo "Generate grpc"
|
||||
|
||||
protoc \
|
||||
-I=/usr/local/include \
|
||||
-I=${GOPATH}/src/github.com/caos/zitadel/pkg/management/api/proto \
|
||||
-I=${GOPATH}/src/github.com/caos/zitadel/pkg/auth/api/proto \
|
||||
-I=${GOPATH}/src/github.com/caos/zitadel/pkg/admin/api/proto \
|
||||
-I=${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption \
|
||||
-I=${GOPATH}/src/github.com/caos/zitadel/console/node_modules/google-proto-files \
|
||||
-I=${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate \
|
||||
-I=${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway \
|
||||
--js_out=import_style=commonjs,binary:$GEN_PATH \
|
||||
--grpc-web_out=import_style=commonjs+dts,mode=grpcweb:$GEN_PATH \
|
||||
${GOPATH}/src/github.com/caos/zitadel/pkg/management/api/proto/*.proto \
|
||||
${GOPATH}/src/github.com/caos/zitadel/pkg/admin/api/proto/*.proto \
|
||||
${GOPATH}/src/github.com/caos/zitadel/pkg/auth/api/proto/*.proto
|
||||
|
||||
echo "Generate annotations js file (compatibility)"
|
||||
|
||||
mkdir -p $GEN_PATH/google/api/
|
||||
touch $GEN_PATH/google/api/annotations_pb.js
|
||||
echo "export {}" > $GEN_PATH/google/api/annotations_pb.d.ts
|
||||
|
||||
mkdir -p $GEN_PATH/validate
|
||||
touch $GEN_PATH/validate/validate_pb.js
|
||||
echo "export {}" > $GEN_PATH/validate/validate_pb.d.ts
|
||||
|
||||
mkdir -p $GEN_PATH/protoc-gen-swagger/options
|
||||
touch $GEN_PATH/protoc-gen-swagger/options/annotations_pb.js
|
||||
echo "export {}" > $GEN_PATH/protoc-gen-swagger/options/annotations_pb.d.ts
|
||||
|
||||
mkdir -p $GEN_PATH/authoption
|
||||
touch $GEN_PATH/authoption/options_pb.js
|
||||
echo "export {}" > $GEN_PATH/authoption/options_pb.d.ts
|
5
build/console/generate-static.sh
Executable file
5
build/console/generate-static.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
go generate pkg/console/console.go
|
18
build/docker/prod
Normal file
18
build/docker/prod
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
FROM alpine:latest as prepare
|
||||
RUN adduser -D zitadel
|
||||
COPY .build/go/zitadel /
|
||||
COPY cmd/zitadel/*.yaml /
|
||||
RUN chmod a+x /zitadel
|
||||
|
||||
#
|
||||
FROM scratch as final
|
||||
COPY --from=prepare /etc/passwd /etc/passwd
|
||||
COPY --from=prepare / /
|
||||
|
||||
USER zitadel
|
||||
|
||||
HEALTHCHECK NONE
|
||||
|
||||
ENTRYPOINT ["/zitadel"]
|
||||
## TODO enable CMD
|
@@ -1,4 +0,0 @@
|
||||
FROM alpine:latest
|
||||
|
||||
COPY .build/angular /app/console
|
||||
COPY .build/go /app
|
@@ -1,10 +0,0 @@
|
||||
# FROM sratch
|
||||
FROM alpine:latest
|
||||
|
||||
RUN addgroup -S zitadel && adduser -S zitadel -G zitadel
|
||||
|
||||
USER zitadel
|
||||
|
||||
COPY .build/angular /app/console
|
||||
COPY .build/go /app
|
||||
|
Reference in New Issue
Block a user