dynamodb-dashboard
Version:
GUI Dashboard for local or remote DynamoDB
213 lines (163 loc) • 8.82 kB
Markdown

## DynamoDB Dashboard
A Web GUI Dashboard for local or remote [DynamoDB](https://aws.amazon.com/blogs/aws/dynamodb-local-for-desktop-development/), inspired from [dynamodb-admin](https://github.com/aaronshaf/dynamodb-admin).
  
 
[](https://github.com/kritish-dhaubanjar/dynamodb-dashboard/actions/workflows/build.yml)
#### Installation:
Install application globally:
```shell
npm install --global dynamodb-dashboard
```
Start `dynamodb-dashboard` instance:
```shell
dynamodb-dashboard start
```
##### Options
- `-d, --debug` : show log output of running application (default: false)
- `-p, --port <port>` : port to run app (default: 4567)
- `-h, --host <host>` : host to run app (default: 127.0.0.1)
#### Setting Environment variables
Currently, following environment variables are supported, with default values:
- `AWS_REGION` (default: us-west-2)
- `AWS_ENDPOINT` (default: http://127.0.0.1:8000)
- `AWS_ACCESS_KEY_ID` (default: fakeAccessKeyId)
- `AWS_SECRET_ACCESS_KEY` (default: fakeSecretAccessKey)
- `AWS_SESSION_TOKEN` (optional)
To configure, set the AWS environment variables in the terminal session before launching `dynamodb-dashboard`, example in `.bashrc` file.
### Development Setup
1. [Setup Vue.js App](https://github.com/kritish-dhaubanjar/dynamodb-dashboard/tree/main/app)
2. [Setup Node Express Server](https://github.com/kritish-dhaubanjar/dynamodb-dashboard/tree/main/server)
**OR**
1. ```shell
git clone https://github.com/kritish-dhaubanjar/dynamodb-dashboard.git
```
2. ```shell
cd dynamodb-dashboard
```
3. ```shell
make watch
```
## Docker
### Dockerfile
<details>
<summary><h4>1. Build Docker image & run a container (from source & Dockerfile)</h4></summary>
**a. Clone Repository**
1. ```shell
git clone https://github.com/kritish-dhaubanjar/dynamodb-dashboard.git
```
2. ```shell
cd dynamodb-dashboard
```
**b. Build Docker Image**
```shell
docker build . -t dynamodb-dashboard:local
```
*Build Arguments:*
- `PORT_ARG` (default: `4567`)
- `HOST_ARG` (default: `0.0.0.0`)
- `PREFIX_ARG` (default: `dynamodb`, prefix of route URIs)
**c. Run Docker Container**
```shell
docker run -p 8080:4567 dynamodb-dashboard:local
```
*Environment Variables:*
- `AWS_REGION` (default: `us-west-2`)
- `AWS_ENDPOINT` (default: `http://127.0.0.1:8000`)
- `AWS_ACCESS_KEY_ID` (default: `fakeAccessKeyId`)
- `AWS_SECRET_ACCESS_KEY` (default: `fakeSecretAccessKey`)
- `AWS_SESSION_TOKEN` (optional)
*NOTE: For dynamodb running in the host machine, use flag `--network=host` for running dynamodb-dashboard container.*
</details>
<details>
<summary><h4>2. Run a container (<a href="https://hub.docker.com/r/kritishdhaubanjar/dynamodb-dashboard">from Docker Hub</a>)</h4></summary>
1. ```shell
docker pull kritishdhaubanjar/dynamodb-dashboard:latest
```
2. ```shell
docker run -p 8080:4567 kritishdhaubanjar/dynamodb-dashboard:latest
```
*Environment Variables:*
- `AWS_REGION` (default: `us-west-2`)
- `AWS_ENDPOINT` (default: `http://127.0.0.1:8000`)
- `AWS_ACCESS_KEY_ID` (default: `fakeAccessKeyId`)
- `AWS_SECRET_ACCESS_KEY` (default: `fakeSecretAccessKey`)
- `AWS_SESSION_TOKEN` (optional)
*NOTE: For dynamodb running in the host machine, use flag `--network=host` for running dynamodb-dashboard container.*
</details>
### docker-compose
<details>
<summary><h4>1. Build Docker image & run a container (from <a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/blob/main/docker-compose.build.yml">docker-compose.build.yml</a>)</h4></summary>
*dynamoDB image (from docker hub) + dynamodb-dashboard image (built from source)*
**a. Clone Repository**
1. ```shell
git clone https://github.com/kritish-dhaubanjar/dynamodb-dashboard.git
```
2. ```shell
cd dynamodb-dashboard
```
**b. Build & Run Docker Image**
```shell
docker-compose -f docker-compose.build.yml up
```
</details>
<details>
<summary><h4>2. Run a container (from <a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/blob/main/docker-compose.yml">docker-compose.yml</a>)</h4></summary>
*dynamoDB image (from docker hub) + dynamodb-dashboard image (from docker hub)*
```shell
docker-compose up
```
</details>
<details>
<summary><h4>3. Run a container (from <a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/blob/main/docker-compose.host.yml">docker-compose.host.yml</a>) using host networking</h4></summary>
*dynamoDB (host network) + dynamodb-dashboard image (from docker hub)*
```shell
docker-compose -f docker-compose.host.yml up
```
</details>
## NGINX Config
To configure Nginx to serve dynamodb-dashboard with (EventSource (Server-Sent Events or SSE) event stream), you need to ensure Nginx is correctly set up to handle long-lived HTTP connections and provide appropriate headers. Here's a basic example configuration:
```nginx
server
{
listen 80;
listen [::]:80;
server_name _;
proxy_read_timeout 1d;
proxy_send_timeout 1d;
proxy_connect_timeout 1d;
location /
{
proxy_pass http://localhost:4567;
}
location /dynamodb/api/database/stream/
{
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding off;
add_header Content-Type text/event-stream;
add_header Cache-Control no-cache;
add_header Connection keep-alive;
proxy_pass http://localhost:4567;
}
}
```
### Preview:


### Demo:
https://user-images.githubusercontent.com/25634165/192109458-a621bc06-788d-4d54-9dc2-9064380ee837.mp4
## Contributors ✨
Thanks goes to these wonderful people:
<table>
<tr>
<td align="center"><a href="https://github.com/sbimochan"><img src="https://avatars.githubusercontent.com/u/11685953?v=4" width="100px;" alt=""/><br /><sub><b>Bimochan Shrestha</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=sbimochan" title="Commits">📖</a></td>
<td align="center"><a href="https://github.com/bipinmdr07"><img src="https://avatars.githubusercontent.com/u/16375412?v=4" width="100px;" alt=""/><br /><sub><b>Bipin Manandhar</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=bipinmdr07" title="Commits">📖</a></td>
<td align="center"><a href="https://github.com/maskeynihal"><img src="https://avatars.githubusercontent.com/u/26411488?v=4" width="100px;" alt=""/><br /><sub><b>Nihal Maskey</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=maskeynihal" title="Commits">📖</a></td>
<td align="center"><a href="https://github.com/bhattaraib58"><img src="https://avatars.githubusercontent.com/u/15843175?v=4" width="100px;" alt=""/><br /><sub><b>Biplap Bhattarai</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=bhattaraib58" title="Commits">📖</a></td>
<td align="center"><a href="https://github.com/JimDabell"><img src="https://avatars.githubusercontent.com/u/5674?v=4" width="100px;" alt=""/><br /><sub><b>Jim Dabell</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=JimDabell" title="Commits">📖</a></td>
<td align="center"><a href="https://github.com/yyyoichi"><img src="https://avatars.githubusercontent.com/u/67273105?v=4" width="100px;" alt=""/><br /><sub><b>yyyoichi</b></sub></a><br /><a href="https://github.com/kritish-dhaubanjar/dynamodb-dashboard/commits?author=yyyoichi" title="Commits">📖</a></td>
</tr>
</table>
# License
Distributed under the MIT License. See `LICENSE` for more information.