-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
58 lines (45 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
backend/install: .env
docker-compose up -d
docker-compose exec backend ./manage.py migrate
docker-compose exec backend ./manage.py createcachetable
backend/start:
docker-compose up
backend/migrate:
docker-compose exec backend ./manage.py migrate
backend/createsuperuser:
docker-compose exec backend ./manage.py createsuperuser
backend/makemigrations:
docker-compose exec backend ./manage.py makemigrations
backend/shell:
docker-compose exec backend ./manage.py shell
db/connect:
docker exec -it falco_db_1 psql -Upostgres postgres
fixtures/load:
docker-compose exec backend ./manage.py load_fixtures
frontend/install: frontend/.env
yarn --cwd frontend install
frontend/start:
yarn --cwd frontend start
.env: .env.example
@if [ -f .env ]; \
then\
echo '\033[1;41m/!\ You already have created .env file. You should have a look at the .env.example file to ensure you have set all required environment variables for docker-compose.\033[0m';\
else\
echo cp .env.example .env;\
cp .env.example .env;\
fi
frontend/.env: frontend/.env.example
@if [ -f frontend/.env ]; \
then\
echo '\033[1;41m/!\ You already have created a .env file for the frontend. You should have a look at the frontend/.env.example to ensure you have set all required environment variables to make the frontend work (this message will not be displayed again).\033[0m';\
else\
echo cp frontend/.env.example frontend/.env;\
cp frontend/.env.example frontend/.env;\
fi
hook:
chmod +x hooks/pre-commit
ln -s -f ../../hooks/pre-commit .git/hooks/pre-commit
install:
make hook
make frontend/install
make backend/install