commit
13cd920ad2
5 changed files with 49 additions and 9 deletions
18
.github/workflows/docker-image.yml
vendored
Normal file
18
.github/workflows/docker-image.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
FROM node:18-bullseye AS builder
|
||||||
|
|
||||||
|
WORKDIR /devel
|
||||||
|
RUN apt-get update ; apt-get upgrade -y ; apt-get install -y build-essential
|
||||||
|
COPY . .
|
||||||
|
RUN npm i ; npm run build
|
||||||
|
|
||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
WORKDIR /exec
|
||||||
|
RUN apk add --update nodejs npm
|
||||||
|
COPY --from=builder /devel/ .
|
||||||
|
RUN adduser -D jankclient
|
||||||
|
|
||||||
|
USER jankclient
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
|
@ -1,8 +1,8 @@
|
||||||
# Jank Client
|
# Jank Client
|
||||||
Jank Client is a [Spacebar](https://spacebar.chat) Client written in TS, HTML, and CSS.
|
Jank Client is a [Spacebar](https://spacebar.chat) Client written in TS, HTML, and CSS.
|
||||||
|
|
||||||
To run it, clone the repo and do `npm install`, then
|
To build it, clone the repo and run `npm install`, then `npm run build`
|
||||||
`node index.js`
|
To run it, use `npm start`
|
||||||
or do the equivalent with bun
|
or do the equivalent with bun
|
||||||
|
|
||||||
Both [Bun](https://bun.sh) and [Node.js](https://nodejs.org) are supported, and should function as expected.
|
Both [Bun](https://bun.sh) and [Node.js](https://nodejs.org) are supported, and should function as expected.
|
||||||
|
|
8
compose.yaml
Normal file
8
compose.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
services:
|
||||||
|
jank:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
|
@ -290,12 +290,8 @@ class Member extends SnowFlake {
|
||||||
hypomember.bio = _;
|
hypomember.bio = _;
|
||||||
regen();
|
regen();
|
||||||
});
|
});
|
||||||
return; //Returns early to stop errors
|
color = (this.accent_color ? "#" + this.accent_color.toString(16) : "transparent") as string;
|
||||||
if (this.accent_color) {
|
|
||||||
color = "#" + this.accent_color.toString(16);
|
|
||||||
} else {
|
|
||||||
color = "transparent";
|
|
||||||
}
|
|
||||||
const colorPicker = settingsLeft.addColorInput(
|
const colorPicker = settingsLeft.addColorInput(
|
||||||
I18n.getTranslation("profileColor"),
|
I18n.getTranslation("profileColor"),
|
||||||
(_) => {},
|
(_) => {},
|
||||||
|
@ -304,7 +300,7 @@ class Member extends SnowFlake {
|
||||||
colorPicker.watchForChange((_) => {
|
colorPicker.watchForChange((_) => {
|
||||||
console.log();
|
console.log();
|
||||||
color = _;
|
color = _;
|
||||||
hypomember.accent_color = Number.parseInt("0x" + _.substr(1), 16);
|
hypomember.accent_color = Number.parseInt("0x" + _.substr(1, 16));
|
||||||
changed = true;
|
changed = true;
|
||||||
regen();
|
regen();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue