Skip to content

Commit

Permalink
tools: getting monorepo tools working and ensuring docker build still…
Browse files Browse the repository at this point in the history
… works
  • Loading branch information
ben-ryder committed Oct 24, 2024
1 parent a7498e7 commit ced5745
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/server-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and publish the server Docker image
name: Create and publish headbase-app/server Docker image
on:
push:
tags:
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ WORKDIR /app

# Ensure husky doesn't run as we're not in a git repo and don't need to setup hooks
RUN HUSKY=0 npm ci
RUN npm run prepare-server-deploy

RUN npm run build

CMD [ "npm", "run", "server:start:prod" ]
CMD [ "npm", "run", "start-server-deploy" ]
172 changes: 169 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 25 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@headbase-app/headbase",
"version": "0.1.0",
"version": "0.0.0",
"description": "The customizable database for your brain. Note-taking, task-management, personal knowledge bases and more.",
"private": true,
"main": "index.js",
Expand All @@ -9,12 +9,28 @@
},
"scripts": {
"prepare": "husky install",
"build": "npm run build --workspace=@headbase-app/common --workspace=@headbase-app/server",
"test": "npm run test --workspace=@headbase-app/server",
"common:build": "npm run build --workspace=@headbase-app/common",
"server:build": "npm run build --workspace=@headbase-app/server",
"server:test": "npm run test --workspace=@headbase-app/server",
"server:start:prod": "npm run start:prod --workspace=@headbase-app/server"
"install-all": "run-p install:*",
"install:common": "cd packages/common && npm install",
"install:toolkit": "cd packages/toolkit && npm install",
"install:server": "cd packages/server && npm install",
"install:web": "cd packages/web && npm install",
"ci-all": "run-p ci:*",
"ci:common": "cd packages/common && npm ci",
"ci:toolkit": "cd packages/toolkit && npm ci",
"ci:server": "cd packages/server && npm ci",
"ci:web": "cd packages/web && npm ci",
"build-all": "run-s build:common build:server build:web",
"build:common": "cd packages/common && npm run build",
"build:server": "cd packages/server && npm run build",
"build:web": "cd packages/web && npm run build",
"test-all": "run-s test:*",
"test:common": "cd packages/common && npm run test",
"test:toolkit": "cd packages/toolkit && npm run test",
"test:server": "cd packages/server && npm run test",
"test:web": "cd packages/web && npm run test",
"prepare-server-deploy": "run-p ci:common ci:server && npm run build:server",
"start-server-deploy": "cd packages/server && npm run start:prod",
"prepare-web-deploy": "run-p ci:common ci:toolkit ci:web && npm run build:web"
},
"repository": {
"type": "git",
Expand All @@ -29,9 +45,9 @@
"devDependencies": {
"@commitlint/cli": "^18.4.2",
"@commitlint/config-conventional": "^18.4.2",
"husky": "^8.0.3"
"husky": "^8.0.3",
"npm-run-all2": "^7.0.1"
},
"dependencies": {},
"engines": {
"node": "20"
}
Expand Down

0 comments on commit ced5745

Please sign in to comment.