-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (31 loc) · 997 Bytes
/
Makefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
env:
cp -v .env.example .env
env-test:
cp -v .env.test .env
build-app:
@ [ -e .env ] || cp -v .env.example .
docker-compose build app
build-test:
docker-compose -f docker-compose.test.yml build app
dev: build-app
docker-compose run --service-ports --rm app 'bash'
lint:
docker-compose -f docker-compose.yml run --rm app 'golangci-lint run -v --fix'
console:
@ [ -e .env ] || cp -v .env.example .
docker-compose build app
docker-compose run --rm app 'bash'
clean:
docker-compose down --remove-orphans --volumes
generate: build-app
docker-compose run --rm app 'go generate ./...'
docker-compose run --rm app './openapi/go/gen.sh'
docker-compose run --rm app 'go run github.com/vektra/mockery/[email protected]'
create-migration:
docker-compose run --rm app "db/scripts/create_migration.sh $(name)"
migrate:
docker-compose run --rm app "db/scripts/migrate.sh"
schema-dump:
docker-compose run --rm app "db/scripts/dump.sh > db/schema.sql"
migrate-up:
/app/db/scripts/migrate.sh