-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakefile
34 lines (24 loc) · 873 Bytes
/
Makefile
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
.PHONY: init start stop custom-build build shell test destroy migrate mysql
init:
cp settings.example.py settings.py
cp celeryconfig.example.py celeryconfig.py
mkdir -p mounts/mysql mounts/logs mounts/fakes3 mounts/uploaded
start:
docker compose up -d
stop:
docker compose down
custom-build:
@read -p "build tag (default is 'latest'): " build_tag; \
docker build -t mltshp/mltshp-web:$${build_tag:-latest}
build:
docker build -t mltshp/mltshp-web:latest .
shell:
docker compose exec mltshp bash
test:
docker compose exec mltshp su mltshp -c "cd /srv/mltshp.com/mltshp; python3 -u test.py $(TEST)"
destroy:
docker compose down && rm -rf mounts
migrate:
docker compose exec mltshp su mltshp -c "cd /srv/mltshp.com/mltshp; python3 migrate.py"
mysql:
docker compose exec mltshp su mltshp -c "cd /srv/mltshp.com/mltshp; mysql -u root --host mysql mltshp"