aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 31 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 07f682f..b15a2bb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,42 +1,52 @@
+DOCKER_COMPOSE := docker compose -f compose.local.yaml
+
.PHONY: build
build:
- docker compose build
+ ${DOCKER_COMPOSE} build
+ cd frontend; npm install
.PHONY: up
up:
- docker compose up -d
+ ${DOCKER_COMPOSE} up -d
+ cd frontend; npm run dev
.PHONY: down
down:
- docker compose down
-
-.PHONY: api-server-only-build
-api-server-only-build:
- docker compose build api-server-only
-
-.PHONY: api-server-only-up
-api-server-only-up:
- docker compose up -d api-server-only
+ ${DOCKER_COMPOSE} down
-.PHONY: api-server-only-down
-api-server-only-down:
- docker compose down api-server-only db
+.PHONY: logs
+logs:
+ ${DOCKER_COMPOSE} logs
.PHONY: psql
psql:
- docker compose exec db psql --user=postgres albatross
+ ${DOCKER_COMPOSE} up --wait db
+ ${DOCKER_COMPOSE} exec db psql --user=postgres albatross
+
+.PHONY: psql-query
+psql-query:
+ ${DOCKER_COMPOSE} up --wait db
+ ${DOCKER_COMPOSE} exec --no-TTY db psql --user=postgres albatross
.PHONY: sqldef-dryrun
sqldef-dryrun: down
- docker compose build db
- docker compose up -d db
- docker compose run --no-TTY tools psqldef --dry-run < ./backend/schema.sql
+ ${DOCKER_COMPOSE} build db
+ ${DOCKER_COMPOSE} up --wait db
+ ${DOCKER_COMPOSE} run --no-TTY tools psqldef --dry-run < ./backend/schema.sql
.PHONY: sqldef
sqldef: down
- docker compose build db
- docker compose up -d db
- docker compose run --no-TTY tools psqldef < ./backend/schema.sql
+ ${DOCKER_COMPOSE} build db
+ ${DOCKER_COMPOSE} up --wait db
+ ${DOCKER_COMPOSE} run --no-TTY tools psqldef < ./backend/schema.sql
+
+.PHONY: init
+init: build initdb
+
+.PHONY: initdb
+initdb:
+ make psql-query < ./backend/schema.sql
+ make psql-query < ./backend/fixtures/dev.sql
.PHONY: oapi-codegen
oapi-codegen: