Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dpr-0 committed Dec 1, 2023
1 parent 5cbd203 commit 0c19cfa
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
# csp0

![GitHub release (with filter)](https://img.shields.io/github/v/release/dpr-0/csp0)
[![Docker build](https://github.com/dpr-0/csp0/actions/workflows/dockerbuild.yml/badge.svg)](https://github.com/dpr-0/csp0/actions/workflows/dockerbuild.yml)
[![codecov](https://codecov.io/gh/dpr-0/csp0/graph/badge.svg?token=D3D2ST9HDG)](https://codecov.io/gh/dpr-0/csp0)

## Minimal container vm
This is my chat side project type-0 backend code.

Colima and Testcontainer docker sock problem

<https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running>

## Create dev env
## Devlopment Environment

```shell
docker compose up -d
make dc
make initdb
make migrate
make run
```

## Gen RSA Key pair
### Create .env

Gen RSA Key pair

```shell
openssl genrsa -out key.pem 2048
openssl rsa -in key.pem -pubout -out public.pem
```

paste them to .env

```text
DATABASE_DSN=postgres://postgres:[email protected]:5432/postgres
REDIS_DSN=redis://localhost:6379?decode_responses=True
JWT_LIFETIME=15
PUBLIC_KEY="here"
PRIVATE_KEY="here"
```

## Test

```shell
make test
```

### Test Coverage

[![codecov](https://codecov.io/gh/dpr-0/csp0/graph/badge.svg?token=D3D2ST9HDG)](https://codecov.io/gh/dpr-0/csp0)
[![codecov](https://codecov.io/gh/dpr-0/csp0/graphs/icicle.svg?token=D3D2ST9HDG)](https://codecov.io/gh/dpr-0/csp0)

## If use Minimal container vm

[Colima and Testcontainer docker sock problem](<https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running>
)

0 comments on commit 0c19cfa

Please sign in to comment.