Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
57 lines (41 loc) · 1.35 KB
/
Copy pathjustfile
File metadata and controls
57 lines (41 loc) · 1.35 KB
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
files_env := env("SOZLUK_COMPOSE_FILES", "compose.yml workers.yml")
files_abs := prepend("docker/dev/", files_env)
files := prepend("-f ", files_abs)
service := "sozluk-web"
_default: (docker 'up -d')
# Run a docker-compose command
docker *args:
docker compose -p sozluk {{ files }} {{ args }}
# Build Docker containers
build *args: (docker 'build' args)
# Start docker containers and attach to them
up *args: (docker 'up' args)
# Stop all Docker containers
stop *args: (docker 'stop' args)
# Run a shell command in Django container
exec *args:
docker exec -it {{ service }} {{ args }}
# Enter Django container console
console *args: (exec '/bin/sh' args)
# Expose uv interface
uv *args: (exec 'uv' args)
# Create or update translation files
makemessages: (exec '/bin/sh -c "python manage.py makemessages --all --no-obsolete"')
# Compile translation files
compilemessages: (exec '/bin/sh -c "python manage.py compilemessages --ignore .venv"')
# Compile documentation
docs:
make -C docs clean html
# Run pre-commit
format *args:
pre-commit run {{ args }}
# Follow logs for given container.
logs container=service:
docker logs {{ container }} --tail 500 --follow
# Execute a Django management command
run *args:
docker exec -it {{ service }} python manage.py {{ args }}
# Enter Django shell
shell: (run 'shell')
alias f := format
alias l := logs