Skip to content

Commit

Permalink
Dockerfile, README.md e screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostWalk committed Sep 13, 2024
1 parent 4999cde commit 9f43c9f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ gopath/
Dockerfile
docker-compose.yml
LICENSE
README.md
README.md
assets/
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ FROM gcr.io/distroless/static

LABEL org.opencontainers.image.source=https://github.com/FrostWalk/GitHub-Inviter

COPY --from=buildenv /go/src/build/inviter /app/inviter
COPY --from=buildenv /go/src/build/static/ /app/static/
COPY --from=buildenv /go/src/build/templates/ /app/templates/
COPY --from=buildenv /go/src/build/inviter /inviter
COPY --from=buildenv /go/src/build/static/ /static/
COPY --from=buildenv /go/src/build/templates/ /templates/

ENTRYPOINT ["/app/inviter"]
CMD ["/inviter"]

ENV GITHUB_ORG_NAME=""
ENV GITHUB_TOKEN=""
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ provided invitation code to get added to the organization's team.
- Configurable for different GitHub organizations and teams
- Optional TLS support for secure connections

## Screenshot
![Screenshot](/assets/images/index.png)

## Configuration

The application is configured using environment variables. Here are the available configuration options:
Expand Down Expand Up @@ -67,10 +70,10 @@ The application will be available at `http://127.0.0.1:8080` (or `https://127.0.

in order for this app to work, it needs an
organization [Personal access token](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/managing-requests-for-personal-access-tokens-in-your-organization)
with read and write permissions on members.
with **read and write permissions on members.**

### Credit

Thanks to
*[Code, Applied To Life](https://medium.com/code-applied-to-life/automated-github-organization-invites-3e940aa27040#.sikfvzyaj)*
this app is heavily inspired by to their work.
this app is heavily inspired by their work.
Binary file added assets/images/index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
func InitCache() error {
cacheMutex.RLock()
var err error
templateCache, err = template.ParseFiles("templates/index.html")
templateCache, err = template.ParseFiles("./templates/index.html")
if err != nil {
cacheMutex.RUnlock()
return err
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {

// Serve the success page
http.HandleFunc("/success", func(writer http.ResponseWriter, request *http.Request) {
http.ServeFile(writer, request, "static/success.html")
http.ServeFile(writer, request, "./static/success.html")
})

// Serve the main page
Expand Down

0 comments on commit 9f43c9f

Please sign in to comment.