askar-website/Makefile
2024-07-17 22:58:28 +02:00

28 lines
569 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 -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