Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMwita committed Mar 5, 2024
1 parent c89aa84 commit f374096
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 5 deletions.
82 changes: 82 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!--
Pull request title should be `MO-XXX - description` or `NOISSUE - description` where XXX is ID of issue that this PR relate to.
For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
For a timely review/response, please avoid force-pushing additional commits if your PR already received reviews or comments.
Before submitting a Pull Request, please ensure that you have:
- 📖 Read the Contributing guide: https://github.com/0x6flab/mpesaoverlay/blob/main/CONTRIBUTING.md
- 📖 Read the Code of Conduct: https://github.com/0x6flab/mpesaoverlay/blob/main/CODE_OF_CONDUCT.md
- Provide tests for your changes.
- Use descriptive commit messages. If you need help you can check out https://pypi.org/project/commitgpt/
- Comment your code where appropriate.
- Squash your commits
- Update any related documentation.
-->

# What type of PR is this?

<!--
(check all applicable)
-->

- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Dependency Update

# Description

<!--
Please describe your pull request.
-->

## Changes that modify/break current functionality

<!--
Please describe the changes that modify/break current functionality.
-->

## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue.
-->

- Related Issue #
- Closes #

## Added/updated tests?

<!--
Please confirm the following before submitting your PR, thank you!
-->

- [ ] Yes
- [ ] No, and this is why: _please replace this line with details on why tests
have not been included_
- [ ] I need help with writing tests

## Added/updated documentation

<!--
Please confirm the following before submitting your PR, thank you!
-->

- [ ] Yes
- [ ] No, and this is why: _please replace this line with details on why
documentation has not been included_
- [ ] I need help with writing documentation

### Notes

<!--
Please provide any additional information you feel is important.
-->
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM golang:alpine as builder

WORKDIR /app

COPY go.mod go.sum ./

RUN go mod download

COPY . .

RUN go build -o main .

FROM scratch

COPY --from=builder /app/main /app/main

EXPOSE 5556

CMD ["/app/main"]
10 changes: 5 additions & 5 deletions pkg/sms/sms_sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

func TestSendSMS(t *testing.T) {
sender := SmsSender{
ApiKey: "your_api_key",
ApiUser: "your_api_user",
Recipients: []string{"+1234567890"},
Message: "Hello, world!",
Sender: "your_sender",
ApiKey: "3432e5e51e098ebc001db7c2544ff23504d9c2609c83ef4e23bdcea6a7cefd85",
ApiUser: "rangechem",
Recipients: []string{"+254745617596"},
Message: "Hello Mike!",
Sender: "RANGECHEM",
}

response, err := sender.SendSMS()
Expand Down

0 comments on commit f374096

Please sign in to comment.