Skip to content

Commit 7a8efa1

Browse files
committed
Initial
0 parents  commit 7a8efa1

110 files changed

Lines changed: 4820 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-hub.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Publish Docker image
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to Docker Hub
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v2
19+
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v2
22+
with:
23+
platforms: 'amd64,arm64'
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
37+
with:
38+
images: interaapps/pastefy-codebox
39+
40+
- name: Build and push Docker image
41+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42+
with:
43+
context: .
44+
push: true
45+
platforms: linux/amd64,linux/arm64
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
dist
3+
node_modules

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM oven/bun
2+
WORKDIR /usr/src/app
3+
4+
COPY . .
5+
RUN bun install --production
6+
RUN bun build.ts
7+
8+
EXPOSE 8000/tcp
9+
ENTRYPOINT [ "bun", "server.ts" ]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Pastefy Codebox

build.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// @ts-ignore
2+
import fs from 'fs'
3+
4+
// @ts-ignore
5+
const result = await Bun.build({
6+
entrypoints: ["./src/main.ts"],
7+
outdir: "./dist",
8+
});
9+
10+
fs.cpSync('./public', './dist', {recursive: true});
11+
12+
if (!result.success) {
13+
console.error("Build failed");
14+
for (const message of result.logs) {
15+
// Bun will pretty print the message object
16+
console.error(message);
17+
}
18+
}

bun.lockb

12.4 KB
Binary file not shown.

package-lock.json

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "pastefy-codebox",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"@types/es6-promise": "^3.3.0",
13+
"@webcontainer/api": "^1.1.9",
14+
"@xterm/xterm": "^5.4.0",
15+
"cajaxjs": "3.0.7",
16+
"highlight.js": "^11.9.0",
17+
"hono": "^4.0.10",
18+
"jdomjs": "3.1.11",
19+
"petrel": "^1.0.7",
20+
"sass": "^1.71.1"
21+
}
22+
}

0 commit comments

Comments
 (0)