Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Mar 10, 2024
0 parents commit 7a8efa1
Show file tree
Hide file tree
Showing 110 changed files with 4,820 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'amd64,arm64'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: interaapps/pastefy-codebox

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
dist
node_modules
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM oven/bun
WORKDIR /usr/src/app

COPY . .
RUN bun install --production
RUN bun build.ts

EXPOSE 8000/tcp
ENTRYPOINT [ "bun", "server.ts" ]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Pastefy Codebox
18 changes: 18 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @ts-ignore
import fs from 'fs'

// @ts-ignore
const result = await Bun.build({
entrypoints: ["./src/main.ts"],
outdir: "./dist",
});

fs.cpSync('./public', './dist', {recursive: true});

if (!result.success) {
console.error("Build failed");
for (const message of result.logs) {
// Bun will pretty print the message object
console.error(message);
}
}
Binary file added bun.lockb
Binary file not shown.
70 changes: 70 additions & 0 deletions package-lock.json

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

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "pastefy-codebox",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@types/es6-promise": "^3.3.0",
"@webcontainer/api": "^1.1.9",
"@xterm/xterm": "^5.4.0",
"cajaxjs": "3.0.7",
"highlight.js": "^11.9.0",
"hono": "^4.0.10",
"jdomjs": "3.1.11",
"petrel": "^1.0.7",
"sass": "^1.71.1"
}
}
Loading

0 comments on commit 7a8efa1

Please sign in to comment.