From 2ef4c079e14654d85fe46f00ccffbf7b28b928f7 Mon Sep 17 00:00:00 2001 From: user-penguin Date: Tue, 21 May 2024 04:59:42 +0700 Subject: [PATCH] try fix --- .drone.yml | 7 ++----- Dockerfile | 5 ++--- docker-compose.yml | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 288e838..6d83332 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,10 +6,7 @@ steps: - name: build image: golang commands: - - set GOOS=linux - - set GOARCH=amd64 - - set CGO_ENABLED=0 - - go build -o cake_crm cmd/cake_crm/main.go + - GOOS=linux GOARCH=amd64 go build -o cake_crm cmd/cake_crm/main.go - name: test image: golang @@ -49,7 +46,7 @@ steps: command_timeout: 10s script: - cd deploys/cake_crm - - docker-compose up -d --force-recreate + - docker-compose up -d --build --force-recreate trigger: event: diff --git a/Dockerfile b/Dockerfile index 78c430e..aa05d53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -FROM golang:1.22 -RUN apk add --no-cache ca-certificates +FROM golang:1.22.3-alpine3.19 COPY cake_crm /usr/local/bin/cake_crm RUN chmod +x /usr/local/bin/cake_crm -CMD ["/usr/local/bin/cake_crm"] \ No newline at end of file +CMD ["cake_crm"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 9b23da0..d24d009 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile ports: - - "8080:8080" + - "8090:8080" # environment: # - ENV_VAR_NAME=env_var_value