-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (15 loc) · 777 Bytes
/
Makefile
File metadata and controls
22 lines (15 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: help install server watch postgres postgres-rm psql
help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Run the initial setup
mix setup
server: ## Start the web server
iex -S mix phx.server
watch: ## Recompile on file changes
find lib/ | entr mix compile
postgres: ## Start a container with latest postgres
docker run --detach -e POSTGRES_PASSWORD="postgres" -p 15432:5432 --name algora_db --volume=algora_db:/var/lib/postgresql/data postgres:latest
postgres-rm: ## Stop and remove the postgres container
docker stop algora_db && docker rm algora_db
psql: ## Connect to postgres
docker exec -it algora_db psql -U postgres -d algora_dev