Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Charlotte
Sharkey
Commits
d3b40ec2
Verified
Commit
d3b40ec2
authored
1 year ago
by
Mar0xy
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://github.com/transfem-org/Sharkey
into develop
parents
2e7b77ce
29a00459
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/docker.yml
+17
-9
17 additions, 9 deletions
.github/workflows/docker.yml
Dockerfile
+13
-13
13 additions, 13 deletions
Dockerfile
healthcheck.sh
+1
-1
1 addition, 1 deletion
healthcheck.sh
with
31 additions
and
23 deletions
.github/workflows/docker.yml
+
17
−
9
View file @
d3b40ec2
...
...
@@ -5,10 +5,17 @@ on:
types
:
[
published
]
workflow_dispatch
:
env
:
REGISTRY
:
ghcr.io
jobs
:
push_to_registry
:
name
:
Push Docker image to
Docker Hub
name
:
Push Docker image to
GHCR
runs-on
:
ubuntu-latest
if
:
github.repository == 'transfem-org/Sharkey'
permissions
:
contents
:
read
packages
:
write
steps
:
-
name
:
Check out the repo
...
...
@@ -17,12 +24,12 @@ jobs:
id
:
buildx
uses
:
docker/setup-buildx-action@v3.0.0
with
:
platforms
:
linux/amd64
,linux/arm64
platforms
:
linux/amd64
-
name
:
Docker meta
id
:
meta
uses
:
docker/metadata-action@v5
with
:
images
:
misskey/miss
key
images
:
${{ env.REGISTRY }}/transfem-org/shar
key
tags
:
|
type=edge
type=ref,event=pr
...
...
@@ -30,12 +37,13 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name
:
Log in to
Docker Hub
-
name
:
Log in to
GHCR
uses
:
docker/login-action@v3
with
:
username
:
${{ secrets.DOCKER_USERNAME }}
password
:
${{ secrets.DOCKER_PASSWORD }}
-
name
:
Build and Push to Docker Hub
registry
:
${{ env.REGISTRY }}
username
:
${{ github.actor }}
password
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Build and Push to GHCR
uses
:
docker/build-push-action@v5
with
:
builder
:
${{ steps.buildx.outputs.name }}
...
...
@@ -43,7 +51,7 @@ jobs:
push
:
true
platforms
:
${{ steps.buildx.outputs.platforms }}
provenance
:
false
tags
:
${{
steps.meta.outputs.tags }}
labels
:
${{ steps.meta.outputs.labels }}
tags
:
${{
env.REGISTRY }}/transfem-org/sharkey:stable
labels
:
stable
cache-from
:
type=gha
cache-to
:
type=gha,mode=max
This diff is collapsed.
Click to expand it.
Dockerfile
+
13
−
13
View file @
d3b40ec2
...
...
@@ -16,7 +16,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN
corepack
enable
WORKDIR
/
miss
key
WORKDIR
/
shar
key
COPY
--link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY
--link ["scripts", "./scripts"]
...
...
@@ -46,7 +46,7 @@ RUN apt-get update \
RUN
corepack
enable
WORKDIR
/
miss
key
WORKDIR
/
shar
key
COPY
--link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY
--link ["scripts", "./scripts"]
...
...
@@ -65,25 +65,25 @@ RUN apt-get update \
ffmpeg tini curl libjemalloc-dev libjemalloc2
\
&&
ln
-s
/usr/lib/
$(
uname
-m
)
-linux-gnu
/libjemalloc.so.2 /usr/local/lib/libjemalloc.so
\
&&
corepack
enable
\
&&
groupadd
-g
"
${
GID
}
"
miss
key
\
&&
useradd
-l
-u
"
${
UID
}
"
-g
"
${
GID
}
"
-m
-d
/
misskey miss
key
\
&&
groupadd
-g
"
${
GID
}
"
shar
key
\
&&
useradd
-l
-u
"
${
UID
}
"
-g
"
${
GID
}
"
-m
-d
/
sharkey shar
key
\
&&
find /
-type
d
-path
/proc
-prune
-o
-type
f
-perm
/u+s
-ignore_readdir_race
-exec
chmod
u-s
{}
\;
\
&&
find /
-type
d
-path
/proc
-prune
-o
-type
f
-perm
/g+s
-ignore_readdir_race
-exec
chmod
g-s
{}
\;
\
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists
USER
miss
key
WORKDIR
/
miss
key
USER
shar
key
WORKDIR
/
shar
key
COPY
--chown=
misskey:miss
key --from=target-builder /
miss
key/node_modules ./node_modules
COPY
--chown=
misskey:miss
key --from=target-builder /
miss
key/packages/backend/node_modules ./packages/backend/node_modules
COPY
--chown=
misskey:miss
key --from=native-builder /
miss
key/built ./built
COPY
--chown=
misskey:miss
key --from=native-builder /
miss
key/packages/backend/built ./packages/backend/built
COPY
--chown=
misskey:miss
key --from=native-builder /
miss
key/fluent-emojis /
miss
key/fluent-emojis
COPY
--chown=
misskey:miss
key . ./
COPY
--chown=
sharkey:shar
key --from=target-builder /
shar
key/node_modules ./node_modules
COPY
--chown=
sharkey:shar
key --from=target-builder /
shar
key/packages/backend/node_modules ./packages/backend/node_modules
COPY
--chown=
sharkey:shar
key --from=native-builder /
shar
key/built ./built
COPY
--chown=
sharkey:shar
key --from=native-builder /
shar
key/packages/backend/built ./packages/backend/built
COPY
--chown=
sharkey:shar
key --from=native-builder /
shar
key/fluent-emojis /
shar
key/fluent-emojis
COPY
--chown=
sharkey:shar
key . ./
ENV
LD_PRELOAD=/usr/local/lib/libjemalloc.so
ENV
NODE_ENV=production
HEALTHCHECK
--interval=5s --retries=20 CMD ["/bin/bash", "/
miss
key/healthcheck.sh"]
HEALTHCHECK
--interval=5s --retries=20 CMD ["/bin/bash", "/
shar
key/healthcheck.sh"]
ENTRYPOINT
["/usr/bin/tini", "--"]
CMD
["pnpm", "run", "migrateandstart"]
This diff is collapsed.
Click to expand it.
healthcheck.sh
+
1
−
1
View file @
d3b40ec2
...
...
@@ -3,5 +3,5 @@
# SPDX-FileCopyrightText: syuilo and other misskey contributors
# SPDX-License-Identifier: AGPL-3.0-only
PORT
=
$(
grep
'^port:'
/
miss
key/.config/default.yml |
awk
'NR==1{print $2; exit}'
)
PORT
=
$(
grep
'^port:'
/
shar
key/.config/default.yml |
awk
'NR==1{print $2; exit}'
)
curl
-s
-S
-o
/dev/null
"http://localhost:
${
PORT
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment