diff --git a/docker-compose.yml b/docker-compose.yml index 99ab4f0..90a48e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,9 @@ services: - postgres networks: - taskcafe-test + environment: + TASKCAFE_DATABASE_HOST: postgres + TASKCAFE_MIGRATE: "true" postgres: image: postgres:12.3-alpine restart: always diff --git a/magefile.go b/magefile.go index 97d58fe..338a751 100644 --- a/magefile.go +++ b/magefile.go @@ -73,7 +73,7 @@ func (Backend) GenFrontend() error { // Build the Go api service func (Backend) Build() error { fmt.Println("compiling binary dist/taskcafe") - return sh.Run("go", "build", "-o", "dist/taskcafe", "cmd/taskcafe/main.go") + return sh.Run("go", "build", "-tags", "prod", "-o", "dist/taskcafe", "cmd/taskcafe/main.go") } // Schema merges GraphQL schema files into single schema & runs gqlgen