Skip to content

Commit

Permalink
Merge pull request #56 from linjie7674/feat/cicd_deploy
Browse files Browse the repository at this point in the history
Add automated deployment
  • Loading branch information
IRONICBo authored Jan 25, 2024
2 parents 8bca5db + b5ed287 commit 057b6f1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: deploy
on:
push:
branches:
- 'feat/mvp-20240119'
- 'dev'

jobs:
docker:
Expand Down
23 changes: 18 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.19
# Build
FROM golang:1.19 AS builder

RUN apt-get update

Expand All @@ -7,9 +8,21 @@ WORKDIR /community
# install goplus
RUN cd .. && git clone -b v1.2.0-pre.1 https://github.com/goplus/gop.git && cd gop && ./all.bash

# run goplus-community
# build goplus-community
COPY . .

# download account repository
RUN cd .. && git clone -b feat/init-account https://github.com/IRONICBo/account.git
CMD bash scripts/start.sh
WORKDIR /community/cmd/gopcomm
RUN go mod tidy
RUN go build -o ./community

# Run
FROM alpine:latest

RUN apk update && apk upgrade
RUN apk --no-cache add libc6-compat

WORKDIR /community/cmd/gopcomm

COPY --from=builder /community /community

CMD ["./community"]

0 comments on commit 057b6f1

Please sign in to comment.