From 17deb28670f69651db648f8b9539143096110160 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 11:12:32 -0800 Subject: [PATCH 01/52] fix typo --- locales/en-US.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 1fff0c22ec..7165c84997 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -925,7 +925,7 @@ migration: "Migration" moveTo: "Move current account to new account" moveToLabel: "Account you're moving to:" moveAccount: "Move account!" -moveAccountDescription: "This process is irriversable. Make sure you've set up an alias for this account on your new account before moving. Please enter the tag of the account formatted like @person@instance.com" +moveAccountDescription: "This process is irreversible. Make sure you've set up an alias for this account on your new account before moving. Please enter the tag of the account formatted like @person@instance.com" moveFrom: "Move to this account from an older account" moveFromLabel: "Account you're moving from:" moveFromDescription: "This will set an alias of your old account so that you can move from that account to this current one. Do this BEFORE moving from your older account. Please enter the tag of the account formatted like @person@instance.com" From 4a21d43b777b5beb63a6f58b35c5babcc7c3f2fe Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 12:08:26 -0800 Subject: [PATCH 02/52] Add cafkafk to patron list --- patrons.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patrons.json b/patrons.json index f7f7a4cef8..d44705452b 100644 --- a/patrons.json +++ b/patrons.json @@ -7,6 +7,7 @@ "@sky@therian.club", "@panos@electricrequiem.com", "@redhunt07@www.foxyhole.io", - "@griff@stop.voring.me" + "@griff@stop.voring.me", + "@cafkafk@ck.cafkafk.com" ] } From 6b4425e30944024d679fe5f589fe6662a3c51bb2 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 13:30:58 -0800 Subject: [PATCH 03/52] =?UTF-8?q?docs:=20=F0=9F=93=9D=20more=20badges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ push-docker.sh | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) delete mode 100755 push-docker.sh diff --git a/README.md b/README.md index cc22bfda92..51c9a65ef8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ **🌎 **[Calckey](https://i.calckey.cloud/)** is an open source, decentralized social media platform that's free forever! 🚀** [![status-badge](https://ci.codeberg.org/api/badges/thatonecalculator/calckey/status.svg)](https://ci.codeberg.org/thatonecalculator/calckey) +[![liberapay-badge](https://img.shields.io/liberapay/receives/ThatOneCalculator?logo=liberapay)](https://liberapay.com/ThatOneCalculator) +[![version-badge](https://img.shields.io/docker/v/thatonecalculator/calckey?logo=docker)](https://hub.docker.com/r/thatonecalculator/calckey) +[![docker-badge](https://img.shields.io/docker/pulls/thatonecalculator/calckey?logo=docker)](https://hub.docker.com/r/thatonecalculator/calckey) diff --git a/push-docker.sh b/push-docker.sh deleted file mode 100755 index 64d1ccdefd..0000000000 --- a/push-docker.sh +++ /dev/null @@ -1,10 +0,0 @@ -sudo systemctl start docker.service -sudo docker rmi $(docker images -q) -sudo docker compose build -sudo docker tag thatonecalculator/calckey:latest thatonecalculator/calckey:$(git describe --tags --exact-match) -sudo docker images -echo "\nPress enter to continue\n" -read -sudo docker push thatonecalculator/calckey:$(git describe --tags --exact-match) -sudo docker push thatonecalculator/calckey:latest -sudo systemctl stop docker.service From eb0f42e53abd47b5bb9761b4449dadeeff103468 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 13:36:50 -0800 Subject: [PATCH 04/52] =?UTF-8?q?docs:=20=F0=9F=93=9D=20badges=20[CI=20Ski?= =?UTF-8?q?p]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51c9a65ef8..03ca16145c 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ [![status-badge](https://ci.codeberg.org/api/badges/thatonecalculator/calckey/status.svg)](https://ci.codeberg.org/thatonecalculator/calckey) [![liberapay-badge](https://img.shields.io/liberapay/receives/ThatOneCalculator?logo=liberapay)](https://liberapay.com/ThatOneCalculator) -[![version-badge](https://img.shields.io/docker/v/thatonecalculator/calckey?logo=docker)](https://hub.docker.com/r/thatonecalculator/calckey) [![docker-badge](https://img.shields.io/docker/pulls/thatonecalculator/calckey?logo=docker)](https://hub.docker.com/r/thatonecalculator/calckey) +[![codeberg-badge](https://custom-icon-badges.demolab.com/badge/hosted%20on-codeberg-blue.svg?logo=codeberg&logoColor=white)](https://codeberg.org/thatonecalculator/calckey/) From 003762fb249751dd79a32043e5e5b2c8ed8193ac Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 13:39:45 -0800 Subject: [PATCH 05/52] Fix spacing --- packages/client/src/components/MkUpdated.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/MkUpdated.vue b/packages/client/src/components/MkUpdated.vue index 2c08a02cc1..e45b853707 100644 --- a/packages/client/src/components/MkUpdated.vue +++ b/packages/client/src/components/MkUpdated.vue @@ -2,7 +2,7 @@
{{ i18n.ts.misskeyUpdated }}
-
✨{{ version }}🚀
+
✨ {{ version }} 🚀
{{ i18n.ts.whatIsNew }} {{ i18n.ts.gotIt }}
From 82732b6532776dc5566c9b33229b44eebed58f06 Mon Sep 17 00:00:00 2001 From: finner Date: Fri, 16 Dec 2022 22:59:10 +0100 Subject: [PATCH 06/52] Fixed path to docker.env on line 36 in docker-compose.yml. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 826a239ee5..41ec491ab7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: networks: - calcnet env_file: - - config/docker.env + - .config/docker.env volumes: - ./db:/var/lib/postgresql/data From e8bef30c0b18f4b9cfd89aea840a2786e38395eb Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Fri, 16 Dec 2022 22:34:27 +0000 Subject: [PATCH 07/52] Update 'docker-README.md' --- docker-README.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docker-README.md b/docker-README.md index cca4c011d8..26d0e940a5 100644 --- a/docker-README.md +++ b/docker-README.md @@ -1,22 +1,16 @@ -# 🐳 Docker Compose for Development - -```sh -cd dev/ -docker-compose build -docker-compose run --rm web yarn run init -docker-compose up -d -``` - -# Running a Calckey instance with Docker +# 🐳 Running a Calckey instance with Docker ## Pre-built docker container [thatonecalculator/calckey](https://hub.docker.com/r/thatonecalculator/calckey) -## docker-compose -You can find a `docker-compose.yml` file in the same folder as this `README`, along with a folder called `.config` containing two **example** files needed to get the instance running: + +## `docker-compose` + +There is a `docker-compose.yml` in the root of the project that you can use to build the container from source + - .config/docker.env (**db config settings**) - .config/default.yml (**calckey instance settings**) -## configuring calckey +## Configuring Rename the files: @@ -33,6 +27,7 @@ You can configure `docker.env` with anything you like, but you will have to pay Everything else can be left as-is. ## Running docker-compose + The [prebuilt container for calckey](https://hub.docker.com/r/thatonecalculator/calckey) is fairly large, and may take a few minutes to download and extract using docker. Copy `docker-compose.yml` and the `config/` to a directory, then run the **docker-compose** command: @@ -42,5 +37,11 @@ NOTE: This will take some time to come fully online, even after download and ext Once the instance is up you can use a web browser to access the web interface at `http://serverip:3000` (where `serverip` is the IP of the server you are running the calckey instance on). -## Securing your instance with a reverse proxy -On its own *calckey* serves itself with HTTP, and does not support SSL. In order to support encrypted connections via HTTPS - an absolute necessity if you intend to host an instance accessible from the public internet - you need to add a reverse proxy to your setup. +## Docker for development + +```sh +cd dev/ +docker-compose build +docker-compose run --rm web yarn run init +docker-compose up -d +``` \ No newline at end of file From 2abe0877e9053d7ee85b3dda79a1ee20edf73e9e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 14:38:18 -0800 Subject: [PATCH 08/52] refactor: :busts_in_silhouette: update cleo link --- packages/client/src/pages/about-calckey.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/about-calckey.vue b/packages/client/src/pages/about-calckey.vue index 1103eb70d8..d7bcb8f6d3 100644 --- a/packages/client/src/pages/about-calckey.vue +++ b/packages/client/src/pages/about-calckey.vue @@ -35,7 +35,7 @@ From 9137698245cefbdfc30e5a2d8f9bb3fd7fbf941c Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 14:52:43 -0800 Subject: [PATCH 09/52] fix: use correct color for MkMoved --- packages/client/src/components/MkMoved.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/MkMoved.vue b/packages/client/src/components/MkMoved.vue index 9c55d62ef4..e9be9a0793 100644 --- a/packages/client/src/components/MkMoved.vue +++ b/packages/client/src/components/MkMoved.vue @@ -21,7 +21,7 @@ defineProps<{ padding: 16px; font-size: 90%; background: var(--infoWarnBg); - color: var(--infoWarnFg); + color: var(--error); border-radius: var(--radius); > .link { From 63f3849872b9e5670c591d5c916ea733f463c4c0 Mon Sep 17 00:00:00 2001 From: chimiana Date: Sat, 17 Dec 2022 00:25:46 +0000 Subject: [PATCH 10/52] Changed filenames and .gitignore to allow a working docker-compose next to the example provided --- .gitignore | 3 +++ dev/{docker-compose.yml => docker-compose.yml.example} | 7 +++++++ 2 files changed, 10 insertions(+) rename dev/{docker-compose.yml => docker-compose.yml.example} (86%) diff --git a/.gitignore b/.gitignore index d511fa5adb..ff2b4f8cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,9 @@ coverage !/.config/example.yml !/.config/docker_example.env +#docker dev config +/dev/docker-compose.yml + # misskey /build built diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml.example similarity index 86% rename from dev/docker-compose.yml rename to dev/docker-compose.yml.example index 25c2e9ea9d..5125a7b72b 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml.example @@ -4,6 +4,7 @@ services: web: image: docker.io/thatonecalculator/calckey build: .. + container_name: calckey_web restart: always depends_on: - db @@ -13,12 +14,14 @@ services: - "3000:3000" networks: - network +# - web volumes: - ../files:/calckey/files - ../.config:/calckey/.config:ro redis: restart: always + container_name: calckey_redis image: docker.io/redis:7.0-alpine networks: - network @@ -27,6 +30,7 @@ services: db: restart: always + container_name: calckey_db image: docker.io/postgres:12.2-alpine networks: - network @@ -48,3 +52,6 @@ services: networks: network: +# web: +# external: +# name: web From 134a7af41105f679614daea0dd014d85988dde23 Mon Sep 17 00:00:00 2001 From: chimiana Date: Sat, 17 Dec 2022 00:31:39 +0000 Subject: [PATCH 11/52] Changes to server admin docker-compose.yml to support having both a dev and a production docker-compose running off the same configs --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 41ec491ab7..f51cf1b9a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ version: "3" services: web: image: docker.io/thatonecalculator/calckey + container_name: calckey_web restart: unless-stopped depends_on: - db @@ -17,11 +18,12 @@ services: NODE_ENV: production volumes: - ./files:/calckey/files - - ./config:/calckey/.config:ro + - ./.config:/calckey/.config:ro redis: restart: unless-stopped image: docker.io/redis:7.0-alpine + container_name: calckey_redis networks: - calcnet volumes: @@ -30,6 +32,7 @@ services: db: restart: unless-stopped image: docker.io/postgres:12.2-alpine + container_name: calckey_db networks: - calcnet env_file: From 464a38cc70e6755ce7676784119b65b696ecc23f Mon Sep 17 00:00:00 2001 From: chimiana Date: Sat, 17 Dec 2022 00:35:21 +0000 Subject: [PATCH 12/52] update example.yml with container names specified in docker-compose, to support running either a dev or production containers off the same configs --- .config/example.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/example.yml b/.config/example.yml index 29f4a62290..2aabbe4b71 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -34,7 +34,7 @@ port: 3000 #───┘ PostgreSQL configuration └──────────────────────────────── db: - host: localhost + host: calckey_db port: 5432 # Database name @@ -55,7 +55,7 @@ db: #───┘ Redis configuration └───────────────────────────────────── redis: - host: localhost + host: calckey_redis port: 6379 #family: 0 # 0=Both, 4=IPv4, 6=IPv6 #pass: example-pass @@ -66,7 +66,7 @@ redis: #───┘ Elasticsearch configuration └───────────────────────────── #elasticsearch: -# host: localhost +# host: calckey_es # port: 9200 # ssl: false # user: From 3e9076045c5129deb8445ba9b48eba5f056a6ca3 Mon Sep 17 00:00:00 2001 From: chimiana Date: Sat, 17 Dec 2022 02:26:19 +0000 Subject: [PATCH 13/52] Fix for #9194, converts webp to png instead of jpg, preserving transparency --- packages/backend/src/services/drive/add-file.ts | 4 +++- packages/client/src/scripts/upload.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/services/drive/add-file.ts b/packages/backend/src/services/drive/add-file.ts index a790fd5104..47b19e23ab 100644 --- a/packages/backend/src/services/drive/add-file.ts +++ b/packages/backend/src/services/drive/add-file.ts @@ -217,8 +217,10 @@ export async function generateAlts(path: string, type: string, generateWeb: bool logger.info('creating web image'); try { - if (['image/jpeg', 'image/webp'].includes(type)) { + if (['image/jpeg'].includes(type)) { webpublic = await convertSharpToJpeg(img, 2048, 2048); + } else if (['image/webp'].includes(type)) { + webpublic = await convertSharpToPng(img, 2048, 2048); } else if (['image/png'].includes(type)) { webpublic = await convertSharpToPng(img, 2048, 2048); } else if (['image/svg+xml'].includes(type)) { diff --git a/packages/client/src/scripts/upload.ts b/packages/client/src/scripts/upload.ts index 714c98d6a8..b1562f4a6a 100644 --- a/packages/client/src/scripts/upload.ts +++ b/packages/client/src/scripts/upload.ts @@ -18,7 +18,7 @@ export const uploads = ref([]); const compressTypeMap = { 'image/jpeg': { quality: 0.85, mimeType: 'image/jpeg' }, - 'image/webp': { quality: 0.85, mimeType: 'image/jpeg' }, + 'image/webp': { quality: 0.85, mimeType: 'image/png' }, 'image/svg+xml': { quality: 1, mimeType: 'image/png' }, } as const; From 9d3acc4786cd5652c7c4ed69bf1b934aba9a9f30 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 16 Dec 2022 18:28:05 -0800 Subject: [PATCH 14/52] chore: lint --- packages/client/src/widgets/instance-cloud.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/widgets/instance-cloud.vue b/packages/client/src/widgets/instance-cloud.vue index f8e463ee33..1358a63b66 100644 --- a/packages/client/src/widgets/instance-cloud.vue +++ b/packages/client/src/widgets/instance-cloud.vue @@ -14,8 +14,9 @@