Skip to content

Commit 2c1d8fe

Browse files
committed
Merge branch 'develop' into pr/saschanaz/9895
2 parents da3fe72 + 320e5db commit 2c1d8fe

File tree

646 files changed

+5600
-9065
lines changed

Some content is hidden

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

646 files changed

+5600
-9065
lines changed

.config/example.yml

+9
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,20 @@ proxyBypassHosts:
131131

132132
# Media Proxy
133133
# Reference Implementation: https://github.com/misskey-dev/media-proxy
134+
# * Deliver a common cache between instances
135+
# * Perform image compression (on a different server resource than the main process)
134136
#mediaProxy: https://example.com/proxy
135137

136138
# Proxy remote files (default: false)
139+
# Proxy remote files by this instance or mediaProxy to prevent remote files from running in remote domains.
137140
#proxyRemoteFiles: true
138141

142+
# Movie Thumbnail Generation URL
143+
# There is no reference implementation.
144+
# For example, Misskey will point to the following URL:
145+
# https://example.com/thumbnail.webp?thumbnail=1&url=https%3A%2F%2Fstorage.example.com%2Fpath%2Fto%2Fvideo.mp4
146+
#videoThumbnailGenerator: https://example.com
147+
139148
# Sign to ActivityPub GET request (default: true)
140149
signToActivityPubGet: true
141150

.devcontainer/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18

.devcontainer/devcontainer.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Misskey",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "app",
5+
"workspaceFolder": "/workspace",
6+
"features": {
7+
"ghcr.io/devcontainers-contrib/features/pnpm:2": {}
8+
},
9+
"forwardPorts": [3000],
10+
"postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh"
11+
}

.devcontainer/devcontainer.yml

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2+
# Misskey configuration
3+
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4+
5+
# ┌─────┐
6+
#───┘ URL └─────────────────────────────────────────────────────
7+
8+
# Final accessible URL seen by a user.
9+
url: http://127.0.0.1:3000/
10+
11+
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
12+
# URL SETTINGS AFTER THAT!
13+
14+
# ┌───────────────────────┐
15+
#───┘ Port and TLS settings └───────────────────────────────────
16+
17+
#
18+
# Misskey requires a reverse proxy to support HTTPS connections.
19+
#
20+
# +----- https://example.tld/ ------------+
21+
# +------+ |+-------------+ +----------------+|
22+
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
23+
# +------+ |+-------------+ +----------------+|
24+
# +---------------------------------------+
25+
#
26+
# You need to set up a reverse proxy. (e.g. nginx)
27+
# An encrypted connection with HTTPS is highly recommended
28+
# because tokens may be transferred in GET requests.
29+
30+
# The port that your Misskey server should listen on.
31+
port: 3000
32+
33+
# ┌──────────────────────────┐
34+
#───┘ PostgreSQL configuration └────────────────────────────────
35+
36+
db:
37+
host: db
38+
port: 5432
39+
40+
# Database name
41+
db: misskey
42+
43+
# Auth
44+
user: postgres
45+
pass: postgres
46+
47+
# Whether disable Caching queries
48+
#disableCache: true
49+
50+
# Extra Connection options
51+
#extra:
52+
# ssl: true
53+
54+
# ┌─────────────────────┐
55+
#───┘ Redis configuration └─────────────────────────────────────
56+
57+
redis:
58+
host: redis
59+
port: 6379
60+
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
61+
#pass: example-pass
62+
#prefix: example-prefix
63+
#db: 1
64+
65+
# ┌─────────────────────────────┐
66+
#───┘ Elasticsearch configuration └─────────────────────────────
67+
68+
#elasticsearch:
69+
# host: localhost
70+
# port: 9200
71+
# ssl: false
72+
# user:
73+
# pass:
74+
75+
# ┌───────────────┐
76+
#───┘ ID generation └───────────────────────────────────────────
77+
78+
# You can select the ID generation method.
79+
# You don't usually need to change this setting, but you can
80+
# change it according to your preferences.
81+
82+
# Available methods:
83+
# aid ... Short, Millisecond accuracy
84+
# meid ... Similar to ObjectID, Millisecond accuracy
85+
# ulid ... Millisecond accuracy
86+
# objectid ... This is left for backward compatibility
87+
88+
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
89+
# ID SETTINGS AFTER THAT!
90+
91+
id: 'aid'
92+
93+
# ┌─────────────────────┐
94+
#───┘ Other configuration └─────────────────────────────────────
95+
96+
# Whether disable HSTS
97+
#disableHsts: true
98+
99+
# Number of worker processes
100+
#clusterLimit: 1
101+
102+
# Job concurrency per worker
103+
# deliverJobConcurrency: 128
104+
# inboxJobConcurrency: 16
105+
106+
# Job rate limiter
107+
# deliverJobPerSec: 128
108+
# inboxJobPerSec: 16
109+
110+
# Job attempts
111+
# deliverJobMaxAttempts: 12
112+
# inboxJobMaxAttempts: 8
113+
114+
# IP address family used for outgoing request (ipv4, ipv6 or dual)
115+
#outgoingAddressFamily: ipv4
116+
117+
# Proxy for HTTP/HTTPS
118+
#proxy: http://127.0.0.1:3128
119+
120+
proxyBypassHosts:
121+
- api.deepl.com
122+
- api-free.deepl.com
123+
- www.recaptcha.net
124+
- hcaptcha.com
125+
- challenges.cloudflare.com
126+
127+
# Proxy for SMTP/SMTPS
128+
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
129+
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
130+
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
131+
132+
# Media Proxy
133+
#mediaProxy: https://example.com/proxy
134+
135+
# Proxy remote files (default: false)
136+
#proxyRemoteFiles: true
137+
138+
# Sign to ActivityPub GET request (default: true)
139+
signToActivityPubGet: true
140+
141+
allowedPrivateNetworks: [
142+
'127.0.0.1/32'
143+
]
144+
145+
# Upload or download file size limits (bytes)
146+
#maxFileSize: 262144000

.devcontainer/docker-compose.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: '3.8'
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
9+
volumes:
10+
- ../:/workspace:cached
11+
12+
command: sleep infinity
13+
14+
networks:
15+
- internal_network
16+
- external_network
17+
18+
redis:
19+
restart: always
20+
image: redis:7-alpine
21+
networks:
22+
- internal_network
23+
volumes:
24+
- redis-data:/data
25+
healthcheck:
26+
test: "redis-cli ping"
27+
interval: 5s
28+
retries: 20
29+
30+
db:
31+
restart: unless-stopped
32+
image: postgres:15-alpine
33+
networks:
34+
- internal_network
35+
environment:
36+
POSTGRES_USER: postgres
37+
POSTGRES_PASSWORD: postgres
38+
POSTGRES_DB: misskey
39+
volumes:
40+
- postgres-data:/var/lib/postgresql/data
41+
healthcheck:
42+
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
43+
interval: 5s
44+
retries: 20
45+
46+
volumes:
47+
postgres-data:
48+
redis-data:
49+
50+
networks:
51+
internal_network:
52+
internal: true
53+
external_network:

.devcontainer/init.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -xe
4+
5+
sudo chown -R node /workspace
6+
git submodule update --init
7+
pnpm install --frozen-lockfile
8+
cp .devcontainer/devcontainer.yml .config/default.yml
9+
pnpm build
10+
pnpm migrate

.editorconfig

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ indent_style = tab
55
indent_size = 2
66
charset = utf-8
77
insert_final_newline = true
8+
end_of_line = lf
89

910
[*.yml]
1011
indent_style = space

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
*.glb -diff -text
66
*.blend -diff -text
77
*.afdesign -diff -text
8+
* text=auto eol=lf
+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: Check copyright year
2-
3-
on:
4-
push:
5-
branches:
6-
- master
7-
- develop
8-
9-
jobs:
10-
check_copyright_year:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/[email protected]
14-
- run: |
15-
if [ "$(grep Copyright COPYING | sed -e 's/.*2014-\([0-9]*\) .*/\1/g')" -ne "$(date +%Y)" ]; then
16-
echo "Please change copyright year!"
17-
exit 1
18-
fi
1+
name: Check copyright year
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
9+
jobs:
10+
check_copyright_year:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- run: |
15+
if [ "$(grep Copyright COPYING | sed -e 's/.*2014-\([0-9]*\) .*/\1/g')" -ne "$(date +%Y)" ]; then
16+
echo "Please change copyright year!"
17+
exit 1
18+
fi

.github/workflows/docker-develop.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ jobs:
1515
- name: Check out the repo
1616
uses: actions/[email protected]
1717
- name: Set up Docker Buildx
18+
id: buildx
1819
uses: docker/[email protected]
20+
with:
21+
platforms: linux/amd64,linux/arm64
1922
- name: Docker meta
2023
id: meta
2124
uses: docker/metadata-action@v4
@@ -27,10 +30,13 @@ jobs:
2730
username: ${{ secrets.DOCKER_USERNAME }}
2831
password: ${{ secrets.DOCKER_PASSWORD }}
2932
- name: Build and Push to Docker Hub
30-
uses: docker/build-push-action@v3
33+
uses: docker/build-push-action@v4
3134
with:
35+
builder: ${{ steps.buildx.outputs.name }}
3236
context: .
3337
push: true
38+
platforms: ${{ steps.buildx.outputs.platforms }}
39+
provenance: false
3440
tags: misskey/misskey:develop
3541
labels: develop
3642
cache-from: type=gha

.github/workflows/docker.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
steps:
1414
- name: Check out the repo
1515
uses: actions/[email protected]
16+
- name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/[email protected]
19+
with:
20+
platforms: linux/amd64,linux/arm64
1621
- name: Docker meta
1722
id: meta
1823
uses: docker/metadata-action@v4
@@ -31,9 +36,14 @@ jobs:
3136
username: ${{ secrets.DOCKER_USERNAME }}
3237
password: ${{ secrets.DOCKER_PASSWORD }}
3338
- name: Build and Push to Docker Hub
34-
uses: docker/build-push-action@v3
39+
uses: docker/build-push-action@v4
3540
with:
41+
builder: ${{ steps.buildx.outputs.name }}
3642
context: .
3743
push: true
44+
platforms: ${{ steps.buildx.outputs.platforms }}
45+
provenance: false
3846
tags: ${{ steps.meta.outputs.tags }}
3947
labels: ${{ steps.meta.outputs.labels }}
48+
cache-from: type=gha
49+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)