-
Notifications
You must be signed in to change notification settings - Fork 7
/
Justfile
72 lines (54 loc) · 1.39 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# And awayyyy we go!
#
set dotenv-load
set positional-arguments
set quiet
# List all recipes (_ == hidden recipe)
_default:
just --list
# Cat the Justfile
cat:
just --dump
# Upgrade dependencies
deps:
clojure -X:antq
# Checks (or formats) the source code
format action="check" files="":
clojure -M:{{action}} {{files}}
# Test the application
test:
bin/test
# Build the application
build:
bin/build
# Create the Docker container
imagify: build
bin/imagify
# Publish the Docker container
publish: build imagify
bin/publish
# Run the Docker services, e.g., PostgreSQL, Redis...
up:
docker compose -f scripts/docker/docker-compose-services.yml up
# Stop running the Docker services
down:
docker compose -f scripts/docker/docker-compose-services.yml down
# Install pre-commit (https://pre-commit.com/)
pre-commit-install:
pre-commit install
# Run pre-commit hooks (to verify at any point, not just on commit)
pre-commit-run hook-id="":
pre-commit run --all-files {{hook-id}}
# Drops and recreates the startrek database
recreate-startrek:
psql -h localhost -d postgres -U postgres -f scripts/sql/200-drop-create-startrek-db.sql
# Run the UberJAR locally
run-local: build
bin/run-local
# Run the Docker container locally
run-docker:
bin/run-docker
# Build, imagify and publish the container
all: build imagify publish
# vim: expandtab:ts=4:sw=4:ft=just