-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
63 lines (47 loc) · 1.45 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
export UID := `id -u`
export GID := `id -g`
COMPOSE := 'docker compose -f docker/compose.yml'
COMPOSE-RUN := COMPOSE + ' run --rm'
PHP-DB-RUN := COMPOSE-RUN + ' php-fpm'
PHP-RUN := COMPOSE-RUN + ' --no-deps php-fpm'
DB-RUN := COMPOSE-RUN + ' --no-deps db'
default:
just --list
# lifecycle commands
init: start
{{PHP-DB-RUN}} bin/console cache:warmup
{{PHP-DB-RUN}} bin/console doctrine:database:drop --force --if-exists
{{PHP-DB-RUN}} bin/console doctrine:database:create
{{PHP-DB-RUN}} bin/console doctrine:schema:create
{{PHP-DB-RUN}} bin/console doctrine:migrations:sync-metadata-storage --no-interaction
{{PHP-DB-RUN}} bin/console doctrine:migrations:version --add --all --no-interaction
start:
{{COMPOSE}} up -d
@echo URL: http://localhost:8080
stop:
{{COMPOSE}} stop
clean:
{{COMPOSE}} rm -vsf
git clean -fdqx -e .idea
rebuild: clean
{{COMPOSE}} build --pull
just install
just init
reset-db:
{{PHP-DB-RUN}} bin/console doctrine:database:drop --force --if-exists
{{PHP-DB-RUN}} bin/console doctrine:database:create
{{PHP-DB-RUN}} bin/console doctrine:schema:create
install:
{{PHP-RUN}} composer --no-interaction install
# utility commands
compose *args:
{{COMPOSE}} {{args}}
compose-run *args:
{{COMPOSE-RUN}} {{args}}
php *args='-h':
{{PHP-RUN}} php {{args}}
composer *args:
{{PHP-RUN}} composer {{args}}
composer-outdated: (composer "install") (composer "outdated --direct --strict")
console *args:
{{PHP-RUN}} bin/console {{args}}