Skip to content

Commit

Permalink
technical debt
Browse files Browse the repository at this point in the history
  • Loading branch information
e154 committed Dec 13, 2023
1 parent f693cc7 commit dc06c9f
Show file tree
Hide file tree
Showing 24 changed files with 111 additions and 481 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: upload gate linux arm-7 artifact
uses: softprops/action-gh-release@v1
with:
files: /home/runner/work/smart-home/smart-home/gate-linux-arm-7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: upload gate linux amd64 artifact
- name: upload cli linux amd64 artifact
uses: softprops/action-gh-release@v1
with:
files: /home/runner/work/smart-home/smart-home/gate-linux-amd64
files: /home/runner/work/smart-home/smart-home/cli-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:

- name: trying to build
id: build-all
run: make build_server build_cli build_gate build_structure build_common_structure build_archive server_docker_image gate_docker_image
run: make build_server build_cli build_structure build_common_structure build_archive docker_image
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,3 @@ server-*
build/public/*
build/admin/*
smart-home-common.tar.gz
/cmd/gate/gate
/cmd/gate/conf
/gate-darwin-10.6-arm64
/gate-linux-amd64
/gate-linux-arm-5
/gate-linux-arm-6
/gate-linux-arm-7
/gate-darwin-10.6-amd64
79 changes: 15 additions & 64 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
.PHONY: get_deps fmt
.DEFAULT_GOAL := build
build: build_public build_server build_cli build_gate
build: build_public build_server build_cli
tests: lint test
all: build build_structure build_common_structure build_archive server_docker_image gate_docker_image
deploy: server_docker_image_upload gate_docker_image_upload
all: build build_structure build_common_structure build_archive docker_image
deploy: docker_image_upload

EXEC=server
CLI=cli
GATE=gate
ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
SERVER_DIR = ${ROOT}/tmp/${EXEC}
GATE_DIR = ${ROOT}/tmp/${GATE}
COMMON_DIR = ${ROOT}/tmp/common
ARCHIVE=smart-home-common.tar.gz

Expand All @@ -24,13 +22,10 @@ GENERATED_VALUE=$(shell date -u +'%Y-%m-%dT%H:%M:%S%z')
DEVELOPERS_VALUE=delta54<[email protected]>
BUILD_NUMBER_VALUE=$(shell echo ${TRAVIS_BUILD_NUMBER})

SERVER_IMAGE=smart-home-${EXEC}
GATE_IMAGE=smart-home-${GATE}
IMAGE=smart-home-${EXEC}
DOCKER_ACCOUNT=e154
SERVER_DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${SERVER_IMAGE}:${RELEASE_VERSION}
SERVER_DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${SERVER_IMAGE}:latest
GATE_DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${GATE_IMAGE}:${RELEASE_VERSION}
GATE_DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${GATE_IMAGE}:latest
DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${IMAGE}:${RELEASE_VERSION}
DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${IMAGE}:latest

VERSION_VAR=${PROJECT}/version.VersionString
REV_VAR=${PROJECT}/version.RevisionString
Expand All @@ -39,7 +34,7 @@ GENERATED_VAR=${PROJECT}/version.GeneratedString
DEVELOPERS_VAR=${PROJECT}/version.DevelopersString
BUILD_NUMBER_VAR=${PROJECT}/version.BuildNumString
DOCKER_IMAGE_VAR=${PROJECT}/version.DockerImageString
GO_BUILD_LDFLAGS= -s -w -X ${VERSION_VAR}=${RELEASE_VERSION} -X ${REV_VAR}=${REV_VALUE} -X ${REV_URL_VAR}=${REV_URL_VALUE} -X ${GENERATED_VAR}=${GENERATED_VALUE} -X ${DEVELOPERS_VAR}=${DEVELOPERS_VALUE} -X ${BUILD_NUMBER_VAR}=${BUILD_NUMBER_VALUE} -X ${DOCKER_IMAGE_VAR}=${SERVER_DOCKER_IMAGE_VER}
GO_BUILD_LDFLAGS= -s -w -X ${VERSION_VAR}=${RELEASE_VERSION} -X ${REV_VAR}=${REV_VALUE} -X ${REV_URL_VAR}=${REV_URL_VALUE} -X ${GENERATED_VAR}=${GENERATED_VALUE} -X ${DEVELOPERS_VAR}=${DEVELOPERS_VALUE} -X ${BUILD_NUMBER_VAR}=${BUILD_NUMBER_VALUE} -X ${DOCKER_IMAGE_VAR}=${DOCKER_IMAGE_VER}
GO_BUILD_FLAGS= -a -installsuffix cgo -v --ldflags '${GO_BUILD_LDFLAGS}'
GO_BUILD_ENV= CGO_ENABLED=0
GO_BUILD_TAGS= -tags 'production'
Expand Down Expand Up @@ -118,15 +113,6 @@ build_cli:
cd ${ROOT}/cmd/cli && ${GO_BUILD_ENV} GOOS=darwin GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${CLI}-darwin-10.6-amd64
cd ${ROOT}/cmd/cli && ${GO_BUILD_ENV} GOOS=darwin GOARCH=arm64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${CLI}-darwin-10.6-arm64

build_gate:
@echo MARK: build gate
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-amd64
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=7 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-7
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=6 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-6
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=5 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-5
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=darwin GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-darwin-10.6-amd64
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=darwin GOARCH=arm64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-darwin-10.6-arm64

build_public:
@echo MARK: build public
echo -e "node version.\n" && \
Expand All @@ -151,8 +137,6 @@ server:

build_structure:
@echo MARK: create server structure
cd ${ROOT}
ls -ll
mkdir -p ${SERVER_DIR}
mkdir -p ${SERVER_DIR}/snapshots
cd ${SERVER_DIR}
Expand All @@ -173,21 +157,6 @@ build_structure:
cp ${ROOT}/${CLI}-darwin-10.6-arm64 ${SERVER_DIR}
cp ${ROOT}/${CLI}-linux-amd64 ${SERVER_DIR}
cp ${ROOT}/bin/server ${SERVER_DIR}
@echo MARK: create gate structure
mkdir -p ${GATE_DIR}
mkdir -p ${GATE_DIR}/conf
cd ${GATE_DIR}
cp ${ROOT}/conf/config.gate.json ${GATE_DIR}/conf
cp ${ROOT}/LICENSE ${GATE_DIR}
cp ${ROOT}/README* ${GATE_DIR}
cp ${ROOT}/CONTRIBUTING.md ${GATE_DIR}
cp ${ROOT}/${GATE}-linux-amd64 ${GATE_DIR}
cp ${ROOT}/${GATE}-linux-arm-7 ${GATE_DIR}
cp ${ROOT}/${GATE}-linux-arm-6 ${GATE_DIR}
cp ${ROOT}/${GATE}-linux-arm-5 ${GATE_DIR}
cp ${ROOT}/${GATE}-darwin-10.6-amd64 ${GATE_DIR}
cp ${ROOT}/${GATE}-darwin-10.6-arm64 ${GATE_DIR}
cp ${ROOT}/bin/gate ${GATE_DIR}

build_common_structure:
@echo MARK: create common structure
Expand Down Expand Up @@ -243,44 +212,26 @@ docs_deploy:
git push -q upstream HEAD:gh-pages
echo -e "Done documentation deploy.\n"

server_docker_image:
cd ${SERVER_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile.server -t ${DOCKER_ACCOUNT}/${SERVER_IMAGE} .

server_docker_image_upload:
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_LATEST}
docker push ${SERVER_DOCKER_IMAGE_VER}
docker push ${SERVER_DOCKER_IMAGE_LATEST}

gate_docker_image:
cd ${GATE_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile.gate -t ${DOCKER_ACCOUNT}/${GATE_IMAGE} .
docker_image:
cd ${SERVER_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile -t ${DOCKER_ACCOUNT}/${IMAGE} .

gate_docker_image_upload:
docker_image_upload:
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_LATEST}
docker push ${GATE_DOCKER_IMAGE_VER}
docker push ${GATE_DOCKER_IMAGE_LATEST}
docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_LATEST}
docker push ${DOCKER_IMAGE_VER}
docker push ${DOCKER_IMAGE_LATEST}

clean:
@echo MARK: clean
rm -rf ${SERVER_DIR}
rm -rf ${GATE_DIR}
rm -f ${ROOT}/${EXEC}-linux-amd64
rm -f ${ROOT}/${EXEC}-linux-arm-7
rm -f ${ROOT}/${EXEC}-linux-arm-6
rm -f ${ROOT}/${EXEC}-linux-arm-5
rm -f ${ROOT}/${EXEC}-darwin-10.6-amd64
rm -f ${ROOT}/${EXEC}-darwin-10.6-arm64
rm -f ${ROOT}/${GATE}-linux-amd64
rm -f ${ROOT}/${GATE}-linux-arm-7
rm -f ${ROOT}/${GATE}-linux-arm-6
rm -f ${ROOT}/${GATE}-linux-arm-5
rm -f ${ROOT}/${GATE}-darwin-10.6-amd64
rm -f ${ROOT}/${GATE}-darwin-10.6-arm64
rm -f ${ROOT}/${CLI}-linux-amd64
rm -f ${ROOT}/${CLI}-darwin-10.6-amd64
rm -f ${ROOT}/${CLI}-darwin-10.6-arm64
Expand Down
71 changes: 17 additions & 54 deletions Makefile.local
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
.PHONY: get_deps fmt
.DEFAULT_GOAL := build
build: build_public build_server build_cli build_gate
build: build_public build_server build_cli
tests: lint test
all: build build_structure build_common_structure build_archive server_docker_image gate_docker_image
deploy: server_docker_image_upload gate_docker_image_upload
all: build build_structure build_common_structure build_archive docker_image
deploy: docker_image_upload

EXEC=server
CLI=cli
GATE=gate
ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
SERVER_DIR = ${ROOT}/tmp/${EXEC}
GATE_DIR = ${ROOT}/tmp/${GATE}
COMMON_DIR = ${ROOT}/tmp/common
ARCHIVE=smart-home-common.tar.gz

Expand All @@ -25,14 +23,11 @@ DEVELOPERS_VALUE=delta54<[email protected]>
BUILD_NUMBER_VALUE=$(shell echo ${TRAVIS_BUILD_NUMBER})
RELEASE_VERSION ?= v0.1.0

SERVER_IMAGE=smart-home-${EXEC}
GATE_IMAGE=smart-home-${GATE}
IMAGE=smart-home-${EXEC}
SERVER ?= 192.168.43.127
DOCKER_ACCOUNT ?= ${SERVER}:5000
SERVER_DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${SERVER_IMAGE}:${RELEASE_VERSION}
SERVER_DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${SERVER_IMAGE}:latest
GATE_DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${GATE_IMAGE}:${RELEASE_VERSION}
GATE_DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${GATE_IMAGE}:latest
DOCKER_IMAGE_VER=${DOCKER_ACCOUNT}/${IMAGE}:${RELEASE_VERSION}
DOCKER_IMAGE_LATEST=${DOCKER_ACCOUNT}/${IMAGE}:latest

VERSION_VAR=${PROJECT}/version.VersionString
REV_VAR=${PROJECT}/version.RevisionString
Expand All @@ -41,7 +36,7 @@ GENERATED_VAR=${PROJECT}/version.GeneratedString
DEVELOPERS_VAR=${PROJECT}/version.DevelopersString
BUILD_NUMBER_VAR=${PROJECT}/version.BuildNumString
DOCKER_IMAGE_VAR=${PROJECT}/version.DockerImageString
GO_BUILD_LDFLAGS= -s -w -X ${VERSION_VAR}=${RELEASE_VERSION} -X ${REV_VAR}=${REV_VALUE} -X ${REV_URL_VAR}=${REV_URL_VALUE} -X ${GENERATED_VAR}=${GENERATED_VALUE} -X ${DEVELOPERS_VAR}=${DEVELOPERS_VALUE} -X ${BUILD_NUMBER_VAR}=${BUILD_NUMBER_VALUE} -X ${DOCKER_IMAGE_VAR}=${SERVER_DOCKER_IMAGE_VER}
GO_BUILD_LDFLAGS= -s -w -X ${VERSION_VAR}=${RELEASE_VERSION} -X ${REV_VAR}=${REV_VALUE} -X ${REV_URL_VAR}=${REV_URL_VALUE} -X ${GENERATED_VAR}=${GENERATED_VALUE} -X ${DEVELOPERS_VAR}=${DEVELOPERS_VALUE} -X ${BUILD_NUMBER_VAR}=${BUILD_NUMBER_VALUE} -X ${DOCKER_IMAGE_VAR}=${DOCKER_IMAGE_VER}
GO_BUILD_FLAGS= -a -installsuffix cgo -v --ldflags '${GO_BUILD_LDFLAGS}'
GO_BUILD_ENV= CGO_ENABLED=0
GO_BUILD_TAGS= -tags 'production'
Expand Down Expand Up @@ -82,7 +77,7 @@ test:
go test -race $(go list ./... | grep -v /tests/)

install_linter:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.55.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.45.0

lint-todo:
@echo MARK: make lint todo
Expand Down Expand Up @@ -120,15 +115,6 @@ build_cli:
#cd ${ROOT}/cmd/cli && ${GO_BUILD_ENV} GOOS=darwin GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${CLI}-darwin-10.6-amd64
#cd ${ROOT}/cmd/cli && ${GO_BUILD_ENV} GOOS=darwin GOARCH=arm64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${CLI}-darwin-10.6-arm64

build_gate:
@echo MARK: build gate
#cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-amd64
cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=7 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-7
#cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=6 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-6
#cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=linux GOARCH=arm GOARM=5 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-linux-arm-5
#cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=darwin GOARCH=amd64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-darwin-10.6-amd64
#cd ${ROOT}/cmd/gate && ${GO_BUILD_ENV} GOOS=darwin GOARCH=arm64 go build ${GO_BUILD_FLAGS} ${GO_BUILD_TAGS} -o ${ROOT}/${GATE}-darwin-10.6-arm64

build_public:
@echo MARK: build public
echo -e "node version.\n" && \
Expand All @@ -150,7 +136,7 @@ server:
oapi-codegen -generate types -package stub ${ROOT}/api/api.swagger3.yaml > ${ROOT}/api/stub/types.go

build_structure:
@echo MARK: create server structure
@echo MARK: create app structure
mkdir -p ${SERVER_DIR}
mkdir -p ${SERVER_DIR}/snapshots
cd ${SERVER_DIR}
Expand All @@ -163,16 +149,6 @@ build_structure:
chmod +x ${SERVER_DIR}/data/scripts/ping.sh
cp ${ROOT}/${EXEC}-linux-arm-7 ${SERVER_DIR}
cp ${ROOT}/bin/server ${SERVER_DIR}
@echo MARK: create gate structure
mkdir -p ${GATE_DIR}
mkdir -p ${GATE_DIR}/conf
cd ${GATE_DIR}
cp ${ROOT}/conf/config.gate.json ${GATE_DIR}/conf
cp ${ROOT}/LICENSE ${GATE_DIR}
cp ${ROOT}/README* ${GATE_DIR}
cp ${ROOT}/CONTRIBUTING.md ${GATE_DIR}
cp ${ROOT}/${GATE}-linux-arm-7 ${GATE_DIR}
cp ${ROOT}/bin/gate ${GATE_DIR}

build_common_structure:
@echo MARK: create common structure
Expand Down Expand Up @@ -228,34 +204,21 @@ docs_deploy:
git push -q upstream HEAD:gh-pages
echo -e "Done documentation deploy.\n"

server_docker_image:
cd ${SERVER_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile.server -t ${DOCKER_ACCOUNT}/${SERVER_IMAGE} .

server_docker_image_upload:
#echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${SERVER_IMAGE} ${SERVER_DOCKER_IMAGE_LATEST}
docker push ${SERVER_DOCKER_IMAGE_VER}
docker push ${SERVER_DOCKER_IMAGE_LATEST}

gate_docker_image:
cd ${GATE_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile.gate -t ${DOCKER_ACCOUNT}/${GATE_IMAGE} .
docker_image:
cd ${SERVER_DIR} && ls -ll && docker build -f ${ROOT}/bin/docker/Dockerfile -t ${DOCKER_ACCOUNT}/${IMAGE} .

gate_docker_image_upload:
docker_image_upload:
#echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${GATE_IMAGE} ${GATE_DOCKER_IMAGE_LATEST}
docker push ${GATE_DOCKER_IMAGE_VER}
docker push ${GATE_DOCKER_IMAGE_LATEST}
docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_VER}
echo -e "docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_LATEST}"
docker tag ${DOCKER_ACCOUNT}/${IMAGE} ${DOCKER_IMAGE_LATEST}
docker push ${DOCKER_IMAGE_VER}
docker push ${DOCKER_IMAGE_LATEST}

clean:
@echo MARK: clean
rm -rf ${SERVER_DIR}
rm -rf ${GATE_DIR}
rm -f ${ROOT}/${EXEC}-linux-arm-7
rm -f ${ROOT}/${GATE}-linux-arm-7

front_client:
@echo MARK: generate front client lib
Expand Down
15 changes: 15 additions & 0 deletions bin/docker/Dockerfile.server → bin/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ EXPOSE 3001
EXPOSE 3002
EXPOSE 3003
EXPOSE 1883
EXPOSE 8080
EXPOSE 8443

ENV PG_USER="smart_home"
ENV PG_PASS="smart_home"
Expand Down Expand Up @@ -47,11 +49,24 @@ ENV MOBILE_HOST=""
ENV MOBILE_PORT="3002"
ENV API_HTTP_PORT="3001"
ENV API_SWAGGER="true"
ENV API_GZIP="false"
ENV LANG="EN"
ENV GOD_MODE="false"
ENV DOMAIN="localhost"
ENV PPROF="false"
ENV HTTPS="false"

ENV GATE_API_HTTP_PORT="8080"
ENV GATE_API_HTTPS_PORT="8443"
ENV GATE_API_DEBUG="false"
ENV GATE_API_GZIP="true"
ENV GATE_DOMAIN="localhost"
ENV GATE_PPROF="false"
ENV GATE_HTTPS="false"
ENV GATE_PROXY_TIMEOUT="1000"
ENV GATE_PROXY_IDLE_TIMEOUT="60000"
ENV GATE_PROXY_SECRET_KEY=""

VOLUME $APP_DIR/snapshots
VOLUME $APP_DIR/data
VOLUME $APP_DIR/conf
23 changes: 0 additions & 23 deletions bin/docker/Dockerfile.gate

This file was deleted.

Loading

0 comments on commit dc06c9f

Please sign in to comment.