-
Notifications
You must be signed in to change notification settings - Fork 0
/
.justfile
49 lines (39 loc) · 1.18 KB
/
.justfile
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
set dotenv-load
_default:
@just --list
# Start the development stack (Livebook + Postgres)
start:
docker-compose up --detach livebook postgres
sleep 3
mix ecto.setup
# Start the notebooks (Livebook)
notebooks:
docker-compose up --detach livebook
# Stop the development stack
stop:
docker-compose down --volumes
# Run the application
server: start
mix phx.server
# Run code quality and unit tests
tests: start
@mix quality
@mix test
# Build documentation & open it in Firefox
docs:
mix docs
firefox doc/index.html
# Run the application stack (App + Livebook + Grafana + Postgres + Prometheus)
docker:
docker build -t roadbook:latest .
docker-compose up --detach grafana
TOKEN=$(bash priv/grafana/create_service_account.sh service_account)
docker-compose up --detach
# Connect to the local PostGres database
db-local:
@echo '\033[0;32mYour are connected to the LOCAL database\033[0m'
PGPASSWORD=postgres psql -d roadbook_dev -h localhost -p 5432 -U postgres
# Connect to the PRODUCTION PostGres database
db-prod:
@echo '\033[0;31mYour are connected to the PRODUCTION database\033[0m'
fly postgres connect -a roadbook-db -d roadbook