-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
36 lines (27 loc) · 918 Bytes
/
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
# Podman or Docker executable
PODMAN_COMPOSE := "podman-compose"
DOCKER_COMPOSE := "docker compose"
COMPOSE_FILE := "-f docker-compose.yaml"
# Check if the podman is available
CONTAINER_EXECUTABLE := if shell('command -v ' + DOCKER_COMPOSE ) != "" { DOCKER_COMPOSE } else { PODMAN_COMPOSE }
# List of command
default:
@just --list
# Start services (and build if needed)
up:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} up -d --build
# Start services (without recreate or build)
start:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} start
# Stop the services
stop:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} stop
# Bring the stack down
down:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} down
# Show the current status
@ps:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} ps
# Show the logs of the service provided as parameter
@logs SERVICE:
{{CONTAINER_EXECUTABLE}} {{COMPOSE_FILE}} logs {{SERVICE}}