try fix
continuous-integration/drone/push Build is failing Details

This commit is contained in:
user-penguin 2024-05-21 04:59:42 +07:00
parent fc04dcc259
commit 2ef4c079e1
3 changed files with 5 additions and 9 deletions

View File

@ -6,10 +6,7 @@ steps:
- name: build - name: build
image: golang image: golang
commands: commands:
- set GOOS=linux - GOOS=linux GOARCH=amd64 go build -o cake_crm cmd/cake_crm/main.go
- set GOARCH=amd64
- set CGO_ENABLED=0
- go build -o cake_crm cmd/cake_crm/main.go
- name: test - name: test
image: golang image: golang
@ -49,7 +46,7 @@ steps:
command_timeout: 10s command_timeout: 10s
script: script:
- cd deploys/cake_crm - cd deploys/cake_crm
- docker-compose up -d --force-recreate - docker-compose up -d --build --force-recreate
trigger: trigger:
event: event:

View File

@ -1,5 +1,4 @@
FROM golang:1.22 FROM golang:1.22.3-alpine3.19
RUN apk add --no-cache ca-certificates
COPY cake_crm /usr/local/bin/cake_crm COPY cake_crm /usr/local/bin/cake_crm
RUN chmod +x /usr/local/bin/cake_crm RUN chmod +x /usr/local/bin/cake_crm
CMD ["/usr/local/bin/cake_crm"] CMD ["cake_crm"]

View File

@ -6,7 +6,7 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8080:8080" - "8090:8080"
# environment: # environment:
# - ENV_VAR_NAME=env_var_value # - ENV_VAR_NAME=env_var_value