-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eureka! separate out build step to improve test speed
- Loading branch information
1 parent
ca16551
commit f84b972
Showing
28 changed files
with
244 additions
and
157 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export const metadata = { | ||
title: 'HarperDB - Next.js v15 App', | ||
}; | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html> | ||
<body> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default async function Page() { | ||
return ( | ||
<div> | ||
<h1>Next.js v15</h1> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'@harperdb/nextjs': | ||
package: '@harperdb/nextjs' | ||
files: '/*' | ||
port: 9926 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
{ | ||
"name": "next-13", | ||
"type": "module" | ||
} | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@harperdb/nextjs": "file:/harperdb-nextjs", | ||
"next": "13.5.7" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export const metadata = { | ||
title: 'HarperDB - Next.js v15 App', | ||
}; | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html> | ||
<body> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default async function Page() { | ||
return ( | ||
<div> | ||
<h1>Next.js v15</h1> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'@harperdb/nextjs': | ||
package: '@harperdb/nextjs' | ||
files: '/*' | ||
port: 9926 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
{ | ||
"name": "next-14", | ||
"type": "module" | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@harperdb/nextjs": "file:/harperdb-nextjs", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"next": "14.2.18" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ARG NODE_MAJOR | ||
|
||
FROM node:${NODE_MAJOR} | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /@harperdb/nextjs | ||
|
||
COPY --exclude=.github --exclude=fixtures --exclude=test --exclude=util --exclude=node_modules --exclude=.node-version --exclude=.git \ | ||
. /@harperdb/nextjs | ||
|
||
RUN npm install -C /@harperdb/nextjs | ||
|
||
RUN npm install -g harperdb | ||
|
||
RUN mkdir -p /hdb/components | ||
|
||
ENV TC_AGREEMENT=yes | ||
ENV HDB_ADMIN_USERNAME=hdb_admin | ||
ENV HDB_ADMIN_PASSWORD=password | ||
ENV ROOTPATH=/hdb | ||
ENV OPERATIONSAPI_NETWORK_PORT=9925 | ||
ENV HTTP_PORT=9926 | ||
|
||
COPY /fixtures/harperdb-base-component /hdb/components/harperdb-base-component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { spawnSync } from 'child_process'; | ||
|
||
|
||
const CONTAINER_ENGINE_LIST = ['podman', 'docker']; | ||
|
||
export function getContainerEngine() { | ||
for (const engine of CONTAINER_ENGINE_LIST) { | ||
const { status } = spawnSync(engine, ['--version'], { stdio: 'ignore' }); | ||
if (status === 0) { | ||
return engine; | ||
} | ||
} | ||
|
||
throw new Error(`No container engine found in ${CONTAINER_ENGINE_LIST.join(', ')}`); | ||
} | ||
|
||
export const containerEngine = getContainerEngine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG BASE_IMAGE | ||
|
||
FROM ${BASE_IMAGE} | ||
|
||
ARG NEXT_MAJOR | ||
|
||
COPY fixtures/next-${NEXT_MAJOR} /hdb/components/next-${NEXT_MAJOR} | ||
|
||
RUN npm install -C hdb/components/next-${NEXT_MAJOR} | ||
|
||
EXPOSE 9925 9926 | ||
|
||
CMD ["harperdb", "run"] |
Oops, something went wrong.