summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 8ce8f7ce5458f588e85ebf780d1621ca50ef5d03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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