ci: Publish Docker images (#41)

Co-authored-by: PalmDevs <git@palmdevs.me>
This commit is contained in:
oSumAtrIX
2024-07-13 14:57:29 +02:00
committed by GitHub
parent 09dc70632d
commit 5aeade122b
12 changed files with 257 additions and 1 deletions

21
bots/discord/.releaserc Normal file
View File

@@ -0,0 +1,21 @@
{
"plugins": [
[
"@codedependant/semantic-release-docker",
{
"dockerImage": "revanced-bot-discord",
"dockerRegistry": "ghcr.io",
"dockerProject": "revanced",
"dockerContext": "../..",
"dockerPlatform": [
"linux/amd64",
"linux/arm64"
],
"dockerArgs": {
"GITHUB_ACTOR": null,
"GITHUB_TOKEN": null
}
}
]
]
}

17
bots/discord/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# This file should be triggered from the monorepo root
FROM oven/bun:latest AS base
FROM base AS build
WORKDIR /build
COPY . .
RUN cd bots/discord && bun run build
FROM base AS release
WORKDIR /app
COPY --from=build /build/bots/discord/dist /app
USER 1000:1000
ENTRYPOINT [ "bun", "run", "src/index.js" ]

View File

@@ -0,0 +1,9 @@
services:
websocket-api:
container_name: revanced-bot-discord
image: ghcr.io/revanced/revanced-bot-discord:latest
volumes:
- /data/revanced-bot-discord:/app
ports:
- 3000:3000
restart: unless-stopped