forked from zhanymkanov/fastapi_production_template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
48 lines (34 loc) · 922 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
37
38
39
40
41
42
43
44
45
46
47
48
default:
just --list
up:
docker-compose up -d
kill:
docker-compose kill
build:
docker-compose build
ps:
docker-compose ps
exec *args:
docker-compose exec app {{args}}
logs *args:
docker-compose logs {{args}} -f
mm *args:
docker compose exec app alembic revision --autogenerate -m "{{args}}"
migrate:
docker compose exec app alembic upgrade head
downgrade *args:
docker compose exec app alembic downgrade {{args}}
ruff *args:
docker compose exec app ruff {{args}} src
docker compose exec app ruff format src
lint:
just ruff --fix
backup:
docker compose exec app_db scripts/backup
# examples:
# "just get-backup dump_name_2021-01-01..backup.gz" to copy particular backup
# "just get-backup" to copy directory (backups) with all dumps
mount-docker-backup *args:
docker cp app_db:/backups/{{args}} ./{{args}}
restore *args:
docker compose exec app_db scripts/restore {{args}}