From af5937d1ef6298f19120ef5a8270331e32509296 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Mon, 13 Mar 2023 21:59:03 -0700 Subject: [PATCH] updated makefile to support migrations via docker --- makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 22a8877..faab6d1 100644 --- a/makefile +++ b/makefile @@ -16,7 +16,10 @@ docker-build: ## Generates the docker image docker image ls | grep newsbot.collector docker-run: ## Runs the docker compose - docker compose up + docker compose --env-file .env up -d + +docker-migrate: ## Runs the migrations stored in the Docker image + docker run -it --env-file .env ghcr.io/jtom38/newsbot.collector:master /app/goose --dir "/app/migrations" up migrate-dev: ## Apply sql migrations to dev db goose -dir "./Newsbot.Collector.Database/Migrations" postgres "host=localhost user=postgres password=postgres dbname=postgres sslmode=disable" up