-
Notifications
You must be signed in to change notification settings - Fork 0
/
.justfile
59 lines (48 loc) · 1.24 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
user := "ecespedes"
name := `basename ${PWD}`
version := `git tag -l | tail -n1`
default:
@just --list
build-latest:
@echo {{version}}
@echo {{name}}
docker build -f ${PWD}/Dockerfile \
-t {{user}}/{{name}}:{{version}} \
-t {{user}}/{{name}}:latest \
.
build-test:
@echo {{version}}
@echo {{name}}
docker build -f ${PWD}/Dockerfile \
-t {{user}}/{{name}}:{{version}} \
.
push-all:
docker push {{user}}/{{name}} --all-tags
push-latest:
docker push {{user}}/{{name}} :{{version}} && \
docker push {{user}}/{{name}} :latest
run-dev:
docker compose -f docker-compose.dev.yml up -d
run-prod:
docker compose -f docker-compose.yml up -d
stop-dev:
docker compose -f docker-compose.dev.yml down
stop-prod:
docker compose -f docker-compose.yml down
run:
docker run --rm \
-d \
--name {{name}} \
--hostname={{name}} \
-p 3306:3306 \
-p 5432:5232 \
-v ./logs:/var/log/ \
-v ./data/bkp_db/:/app/bkp_db \
{{user}}/{{name}}:{{version}}
bash:
docker run --rm \
-it \
--name {{name}} \
-v ./logs:/var/log \
{{user}}/{{name}}:{{version}} \
bash