diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-18 11:06:32 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-18 11:06:32 +0100 |
commit | 20560419614e22fbb58567cdb0b88b54caf679f4 (patch) | |
tree | 163df44f07907d865b363db3bc198287ebd3d25f /Makefile | |
parent | 435742cede199e3c85b5e2eb5a42ccbee4906a05 (diff) |
Adds code from ded-go-core - no database
D2S test app code removed (nginx error).
Adds all go code from `ded-go-core` using the basic Gov.UK UI for a test
page for DED.
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 |