ci: update docker file
This commit is contained in:
parent
f346241e5c
commit
78aa85dc20
|
@ -1,18 +0,0 @@
|
|||
run-name: ${{ gitea.actor }}, deploy with ssh
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Rebuild docker compose
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd /home/log101/prod/log101.dev-services
|
||||
git pull
|
||||
docker compose up -d --build
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.22.3
|
||||
FROM golang:1.22.3-alpine as builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -7,6 +7,10 @@ COPY go.mod go.sum ./
|
|||
RUN go mod download && go mod verify
|
||||
|
||||
COPY . .
|
||||
RUN go build -v -o /usr/local/bin ./...
|
||||
RUN go build -v -o log101-dot-dev-services
|
||||
|
||||
CMD ["log101-blog-services"]
|
||||
FROM alpine
|
||||
WORKDIR /root/app
|
||||
COPY --from=builder /usr/src/app .
|
||||
|
||||
CMD ["./log101-dot-dev-services"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user