28 lines
580 B
Makefile
28 lines
580 B
Makefile
DOCKER ?= docker
|
|
COMPOSE ?= docker compose
|
|
PUBLIC_URL ?= https://askar.abbiamoundominio.org
|
|
|
|
dev-run:
|
|
$(COMPOSE) up
|
|
|
|
dev-stop:
|
|
$(COMPOSE) down
|
|
|
|
dev-clean:
|
|
$(COMPOSE) down --volumes
|
|
|
|
dev-dump:
|
|
mariadb-dump --hex-blob -h 127.0.0.1 -P 3306 --user root --password=toor askar > ./assets/db/dump.sql
|
|
|
|
./out:
|
|
mkdir ./out
|
|
|
|
prepare: ./out prepare-image prepare-db
|
|
|
|
prepare-image:
|
|
$(DOCKER) build -t unit/askar-website .
|
|
$(DOCKER) image save -o out/image.tar unit/askar-website
|
|
|
|
prepare-db:
|
|
cat ./assets/db/dump.sql | sed -e 's;http://localhost:8080;$(PUBLIC_URL);g' > ./out/db.sql
|