v1.0.0: dev: add dev and test conseil
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
15b9d0c2e3
commit
df7a17cf9d
2 changed files with 12 additions and 0 deletions
|
|
@ -41,9 +41,14 @@ services:
|
|||
ports:
|
||||
- 127.0.0.1:2300:1222
|
||||
volumes:
|
||||
- .:/app:ro
|
||||
- ./docker/keys:/keys
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ENDFILE
|
||||
|
||||
cat config/db.sql| docker compose exec -T postgres psql -U acc accounts
|
||||
|
||||
curl -s http://127.0.0.1:2300/ -H "Content-Type: application/json" -d "{\"username\":\"root@root.fr\",\"password\":\"root\"}" | jq -r '.token'
|
||||
```
|
||||
7
config/db.sql
Normal file
7
config/db.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
CREATE TABLE users (
|
||||
username TEXT PRIMARY KEY,
|
||||
email TEXT UNIQUE NOT NULL,
|
||||
password TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO users(username, email, password) VALUES('0000000023', 'root@root.fr', '$2a$14$FU8FKR7pUq4akLThraD9kOu0zY0BuUFASo0xakgWEWbYF2gz20DuG');
|
||||
Loading…
Add table
Add a link
Reference in a new issue