fix: update docker compose to auto migrate

This commit is contained in:
Jordan Knott 2020-08-21 23:10:38 -05:00
parent 314bf224ea
commit 08bb5d0eca
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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