Merge branch 'backend' into db
This commit is contained in:
commit
c7fae6499c
2 changed files with 39 additions and 0 deletions
27
backend/README.md
Normal file
27
backend/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
## Database Schema
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
user {
|
||||
string name PK
|
||||
}
|
||||
|
||||
game {
|
||||
serial game_id PK
|
||||
int score
|
||||
time playtime
|
||||
date date
|
||||
string username FK
|
||||
}
|
||||
|
||||
user ||--O{ game : "played"
|
||||
|
||||
user_data {
|
||||
string username PK
|
||||
int highscore
|
||||
int total_score
|
||||
int total_playtime
|
||||
int average_score
|
||||
int games_played
|
||||
}
|
||||
```
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
version: '3.1'
|
||||
|
||||
services:
|
||||
db:
|
||||
build: backend/db
|
||||
environment:
|
||||
POSTGRES_DB: rr
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
volumes:
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue