add prod automation
This commit is contained in:
parent
431b5ebb99
commit
9dd4dceafa
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/out
|
16
Makefile
16
Makefile
|
@ -1,5 +1,6 @@
|
||||||
DOCKER ?= docker
|
DOCKER ?= docker
|
||||||
COMPOSE ?= docker compose
|
COMPOSE ?= docker compose
|
||||||
|
PUBLIC_URL ?= https://askar.abbiamoundominio.org
|
||||||
|
|
||||||
dev-run:
|
dev-run:
|
||||||
$(COMPOSE) up
|
$(COMPOSE) up
|
||||||
|
@ -9,3 +10,18 @@ dev-stop:
|
||||||
|
|
||||||
dev-clean:
|
dev-clean:
|
||||||
$(COMPOSE) down --volumes
|
$(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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user