-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) |