Skip to content
This repository has been archived by the owner on Dec 27, 2020. It is now read-only.

Configure continuous delivery for the backend #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shuimengzhi
Copy link
Member

a simple server and ci config,docker image:))

Comment on lines +5 to +7
RUN go mod download \
&& go mod verify \
&& go build -o build/app main.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's separate them into separate RUN command so that we leverage Docker layer caching to avoid re downloading all dependencies when go build command changes.

&& go mod verify \
&& go build -o build/app main.go

CMD ["/app/build/app"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add multi stage build so that we don't have to package all dependencies together into production container to reduce production container size: https://github.com/short-d/app-template/blob/master/backend/Dockerfile


go 1.14

require github.com/short-d/app v0.0.0-20200627081605-eabc0539025f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are should be other indirect dependencies being added here because they are not yet using Go modules.

}

routingService := service.
NewRoutingBuilder("Example").
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NewRoutingBuilder("Example").
NewRoutingBuilder("Emotic").

@magicoder10 magicoder10 changed the title ci config Configure continuous delivery for the backend Aug 30, 2020
@magicoder10
Copy link
Member

Hi @waterhark, thank you so much for working on this PR!
I wonder where are .gitignore, k8s, and scripts?

@magicoder10
Copy link
Member

scripts are needed to simplify our development process. k8s are the kubernetes config files needed to deploy the service.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants