diff --git a/.gitignore b/.gitignore index 356b16b..46423bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ dev-db/ database/ **/.env -PostgreSQL/build/* +*.data diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d26152d --- /dev/null +++ b/Makefile @@ -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 + diff --git a/PostgreSQL/Makefile b/PostgreSQL/Makefile index 23784b2..27db067 100644 --- a/PostgreSQL/Makefile +++ b/PostgreSQL/Makefile @@ -1,5 +1,5 @@ -DIR_SRC=src -DIR_BUILD=build +DIR_SRC = src +DIR_BUILD = build BIN = 00_drop.sql 01_create.sql 02_insert.sql \ 03_select.sql 04_update.sql diff --git a/README.md b/README.md index 8f98387..d3a6780 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,18 @@ On aime les briques ## Generating data -To use the script `generate_data.py`, do : - -1) `cd PostgreSQL/` -2) `rm -fr build/*` (don't remove the directory, just the files in it.) -3) `python generate_data.py` +``` +cd PostgreSQL/ +make generate_data +``` ## Dev 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 ```