-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
27 lines (23 loc) · 876 Bytes
/
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
.DEFAULT_GOAL := help
help: ### Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
setup: ### Initial setup of the project
echo 'Creating a virtual env...'
python3 -m venv ./backend/venv
echo 'activating the virtualenv...'
chmod a+x ./backend/venv/bin/activate
./backend/venv/bin/activate
echo 'installing dependencies...'
pip install uv
uv pip install -r ./backend/requirements.txt
pnpm install --frozen-lockfile
echo 'initializating docker swarm'
docker swarm init || true
migrate: ### Run db migration
./backend/venv/bin/activate
python ./backend/manage.py migrate
dev: ### Start the DEV server
pnpm --recursive --parallel run dev
reset-db: ### Wipe out the database and reset the application to its initial state
chmod a+x reset-db.sh
./reset-db.sh