From 1460171e62ea006d846a8048ab17811eb6d9de10 Mon Sep 17 00:00:00 2001 From: whitzards Date: Fri, 6 Sep 2024 09:45:45 +0800 Subject: [PATCH] feature: arm support for docker-compose deploy Signed-off-by: whitzards --- Makefile | 2 +- makefiles/const.mk | 3 ++- scripts/dockercompose/docker-compose.yml | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f79f74c7..88e1c7f8 100644 --- a/Makefile +++ b/Makefile @@ -56,4 +56,4 @@ vendor: ; $(info $(M)...Begin to update vendor.) @ ## update vendor export GOWORK=off && go mod vendor server-api-docs: swagci ; $(info $(M)...Begin to update server apidocs.) - export GOWORK=off && $(SWAGCI) init -g ./cmd/server/main.go -parseDependency=true -o ./docs/swagger/server/ \ No newline at end of file + export GOWORK=off && $(SWAGCI) init -g ./cmd/server/main.go --parseDependency=true -o ./docs/swagger/server/ \ No newline at end of file diff --git a/makefiles/const.mk b/makefiles/const.mk index 596550bb..8a4cedd7 100644 --- a/makefiles/const.mk +++ b/makefiles/const.mk @@ -1,4 +1,3 @@ - ROOT_DIR = $(shell pwd) PACKAGE=gitee.com/openeuler/PilotGo/cmd/server/app/cmd/commands @@ -15,6 +14,8 @@ NODE_VERSION = v20.15.1 YARN_VERSION = 1.22.22 NVM_vERSION = 0.39.7 GO_VERSION = 1.22.0 +DOCKER_VERSION= 26.1.3 +DOCKER_COMPOSE_VERSION = v2.27.1 GOARCH = amd64 diff --git a/scripts/dockercompose/docker-compose.yml b/scripts/dockercompose/docker-compose.yml index 33b5e91f..b97bb88c 100644 --- a/scripts/dockercompose/docker-compose.yml +++ b/scripts/dockercompose/docker-compose.yml @@ -1,10 +1,10 @@ version: '3' services: server: - # build: - # context: ../../ - # dockerfile: ./dockerfile - image: registry.cn-hangzhou.aliyuncs.com/pilotgo/pilotgo:latest + build: + context: ../../ + dockerfile: ./dockerfile + # image: registry.cn-hangzhou.aliyuncs.com/pilotgo/pilotgo:latest ports: - "8888:8888" - "8889:8889" @@ -20,7 +20,7 @@ services: networks: - pilotgo_net mysql: - image: mysql:8.0.21 + image: mysql:8.1.0 command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci security_opt: - seccomp:unconfined @@ -35,7 +35,7 @@ services: environment: MYSQL_ROOT_PASSWORD: 'u3bd99dMNFKQ3Wi9' MYSQL_DATABASE: 'PilotGo' - MYSQL_USER: 'root' + MYSQL_USER: 'pilotgo' volumes: - mysql:/var/lib/mysql networks: -- Gitee