Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e dashboard backend documentation and Dockerfile #351

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dashboard-backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Source code
.git*
.dockerignore
Dockerfile*
docker-compose*

# Logs
logs
*.log

# VS Code
.vscode

# ENV
*.env
20 changes: 20 additions & 0 deletions dashboard-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM golang:alpine

LABEL maintainer="LitmusChaos"

RUN mkdir /usr/app

WORKDIR /usr/app

COPY go.mod ./
COPY go.sum ./

RUN go mod download

COPY . .

RUN go build -o /dashboard-backend

EXPOSE 8080

CMD [ "/dashboard-backend" ]
24 changes: 22 additions & 2 deletions dashboard-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,32 @@

## Installation Steps

- Create a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
- Create a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

- Create a file `.env` and add the below content.
```
GITHUB_USERNAME=your_github_username
GITHUB_PAT=your_github_personal_access_token
```

- Replace `your_github_personal_access_token` with the actual token value created in first step and replace `your_github_username` with the GitHub account from which the token was created.
- Replace `your_github_personal_access_token` with the actual token value created in the first step and replace `your_github_username` with the GitHub account from which the token was created.

- Run the below command to install the required dependencies.

```go
go mod download
```

## Run locally

Run the below command to start the server:

```go
go run main.go
```

Go to: http://localhost:8080

## Contributing

We like contributions in several forms, see [CONTRIBUTING.md](https://github.com/litmuschaos/litmus-e2e/blob/master/CONTRIBUTING.md) for more details.