content page
This commit is contained in:
parent
fd2877da9e
commit
36b2c56987
14 changed files with 590 additions and 20 deletions
8
Makefile
8
Makefile
|
|
@ -5,7 +5,7 @@ GOOSE ?= go run github.com/pressly/goose/v3/cmd/goose@v3.24.3
|
|||
POSTGRES_URL ?= postgres://cms:cms@localhost:5432/cms?sslmode=disable
|
||||
ADMIN_DATABASE_URL ?= ./cms-admin.db
|
||||
|
||||
.PHONY: up down migrate backend frontend dev
|
||||
.PHONY: up down migrate seed backend frontend dev
|
||||
|
||||
up:
|
||||
$(COMPOSE) up -d --wait
|
||||
|
|
@ -17,6 +17,9 @@ migrate:
|
|||
$(GOOSE) -dir cmd/server/migrations/postgres postgres "$(POSTGRES_URL)" up
|
||||
$(GOOSE) -dir cmd/server/migrations/admin sqlite3 "$(ADMIN_DATABASE_URL)" up
|
||||
|
||||
seed:
|
||||
psql "$(POSTGRES_URL)" -v ON_ERROR_STOP=1 -f scripts/seed_content.sql
|
||||
|
||||
backend:
|
||||
set -a; [ ! -f .env ] || . ./.env; set +a; \
|
||||
CMS_ADMIN_DATABASE_URL="$${CMS_ADMIN_DATABASE_URL:-$(ADMIN_DATABASE_URL)}" \
|
||||
|
|
@ -24,6 +27,9 @@ backend:
|
|||
go run ./cmd/server
|
||||
|
||||
frontend:
|
||||
@if [ ! -x ui/app/node_modules/.bin/vite ]; then \
|
||||
npm --prefix ui/app ci; \
|
||||
fi
|
||||
npm --prefix ui/app run dev
|
||||
|
||||
dev: up migrate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue