diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ce8f7c --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +create-network: + @docker network create ded + +docker-build-app: + @docker build -t ded-core:latest . + +docker-run-app: + @docker run -it --rm --network ded --name ded-app -p 4000:4000 -v ./:/app ded-core:latest + +docker-build-postres: + @docker build -t postgres -f postgresql/Dockerfile . + +docker-run-postgres: + @docker run --name ded-db --network ded -d --rm -e POSTGRES_PASSWORD=secret -v ded-data:/var/lib/postgres/data -p 5432:5432 postgres + +docker-stop-app: + @docker stop ded-core + +# run: +# @go run ./cmd/web -addr ":4000" + +# assume GRANT SELECT, INDEX, CREATE, INSERT, UPDATE, DROP, DELETE ON ded.* TO 'web'@'localhost'; +# assume CREATE DATABASE ded CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +populate: + mariadb -u web ded -p < populate.sql + +entr-run: + find . | entr -r go run ./cmd/web |