-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.justfile
71 lines (60 loc) · 1.55 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
#!/usrenv -S just --justfile
# ^ A shebang isn't required, but allows a justfile to be executed
# like a script, with `./justfile test`, for example.
set dotenv-filename := '.env'
set dotenv-load := true
# set dotenv-path := './'
set ignore-comments := false
log := "warn"
#############
## Chooser ##
#############
default:
@just --choose
## Simpele
# docker run --interactive --tty --rm --volume $(pwd)/app:/project --workdir /project eclipse-temurin:17-jdk-jammy bash
# Run the build command
build:
@echo "Building dev-container..."
docker compose build
alias b := build
# Run container interactively
run:
@echo "Running in interactive mode..."
docker compose up
alias r := run
# Run container detached
run-detached:
@echo "Running in detached mode..."
docker compose up --detach
alias rd := run-detached
# Run container detached
run-shell:
@echo "Running interactive shell..."
docker compose up --detach
docker compose exec --interactive --tty app bash
alias rs := run-shell
# Compile the project
run-compile:
@echo "Running compile..."
docker compose exec app mvn build
alias rc := run-compile
# Run the test command
run-test:
@echo "Running test..."
docker compose exec app mvn test
alias rt := run-test
# Restart container
restart:
@echo "Restarting container..."
docker compose restart
alias res := restart
# Shut down conatiner
shut-down:
@echo "Restarting container..."
docker compose down
alias down := shut-down
# Run the clean command
clean:
@echo "Cleaning up..."
docker compose down --volumes