feat: adding a Makefile at the root.

This commit is contained in:
damien DELPY 2024-11-25 21:27:16 +01:00
parent 935d3812f7
commit 5815ab2a22
No known key found for this signature in database
4 changed files with 23 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
dev-db/ dev-db/
database/ database/
**/.env **/.env
PostgreSQL/build/* *.data

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
DIR_SQL = PostgreSQL
DIR_BACK = back-end
BIN = prepare_dev
all: $(BIN)
prepare_dev:
cp $(DIR_BACK)/.env.example $(DIR_BACK)/.env
clean:
rm -f $(DIR_BACK)/.env
cd $(DIR_SQL) && make clean

View File

@ -9,18 +9,18 @@ On aime les briques
## Generating data ## Generating data
To use the script `generate_data.py`, do : ```
cd PostgreSQL/
1) `cd PostgreSQL/` make generate_data
2) `rm -fr build/*` (don't remove the directory, just the files in it.) ```
3) `python generate_data.py`
## Dev ## Dev
To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run : To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run :
``` ```
cp back-end/.env.example back-end/.env cd free-briques/
make
docker compose -f docker-compose.dev.yml up docker compose -f docker-compose.dev.yml up
``` ```