dockyfied dockyfied
This commit is contained in:
parent
47453b8a02
commit
6476d54164
@ -13,3 +13,4 @@ helm-charts
|
||||
.editorconfig
|
||||
.idea
|
||||
coverage*
|
||||
build
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
# deps
|
||||
node_modules/
|
||||
build/
|
||||
|
12
Dockerfile
12
Dockerfile
@ -21,18 +21,18 @@ FROM base AS prerelease
|
||||
COPY --from=install /temp/dev/node_modules node_modules
|
||||
COPY . .
|
||||
|
||||
# [optional] tests & build
|
||||
ENV NODE_ENV=production
|
||||
RUN bun test
|
||||
RUN bun run build
|
||||
|
||||
# copy production dependencies and source code into final image
|
||||
FROM base AS release
|
||||
COPY --from=install /temp/prod/node_modules node_modules
|
||||
COPY --from=prerelease /usr/src/app/index.ts .
|
||||
# COPY --from=install /temp/prod/node_modules node_modules
|
||||
# COPY --from=prerelease /usr/src/app/index.ts .
|
||||
COPY --from=prerelease /usr/src/app/package.json .
|
||||
COPY --from=prerelease /usr/src/app/build/ .
|
||||
COPY --from=prerelease /usr/src/app/static/ ./static
|
||||
|
||||
# run the app
|
||||
USER bun
|
||||
EXPOSE 3000/tcp
|
||||
ENTRYPOINT [ "bun", "run", "index.ts" ]
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT [ "bun", "run", "index.js" ]
|
||||
|
5
docker-compose.yml
Normal file
5
docker-compose.yml
Normal file
@ -0,0 +1,5 @@
|
||||
services:
|
||||
dockyfied:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "dockyfied",
|
||||
"scripts": {
|
||||
"dev": "bun run --watch src/index.tsx"
|
||||
"dev": "bun run --watch src/index.tsx",
|
||||
"build": "bun build src/index.tsx --outdir ./build --splitting"
|
||||
},
|
||||
"dependencies": {
|
||||
"hono": "^4.7.1"
|
||||
|
@ -4,7 +4,7 @@ import { logger } from 'hono/logger';
|
||||
import BaseDocument from './BaseDocument';
|
||||
|
||||
function ImageButton() {
|
||||
return <button hx-get='/image' hx-target='this' hx-swap="outerHTML">See Image</button>;
|
||||
return <button hx-get='/image' hx-target='this' hx-swap="outerHTML">See Meme</button>;
|
||||
}
|
||||
|
||||
const app = new Hono();
|
||||
@ -31,7 +31,7 @@ app.get(
|
||||
<p>↑</p>
|
||||
<p>Click the image above to replace with the button again.</p>
|
||||
<br />
|
||||
<p id='secret' hx-swap='outerHTML' hx-get='/image2'>Another image?</p>
|
||||
<p id='secret' hx-swap='outerHTML' hx-get='/image2'>Another Meme?</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user