initial commit
This commit is contained in:
commit
94966fce30
131
.drone.yml
Normal file
131
.drone.yml
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: publish-amd64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: push
|
||||||
|
image: plugins/docker:20
|
||||||
|
settings:
|
||||||
|
username: asonix
|
||||||
|
password:
|
||||||
|
from_secret: dockerhub_token
|
||||||
|
repo: asonix/murmur
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-amd64
|
||||||
|
build_args:
|
||||||
|
- REPO_ARCH=amd64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: publish-arm64v8
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: push
|
||||||
|
image: plugins/docker:20
|
||||||
|
settings:
|
||||||
|
username: asonix
|
||||||
|
password:
|
||||||
|
from_secret: dockerhub_token
|
||||||
|
repo: asonix/murmur
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64v8
|
||||||
|
build_args:
|
||||||
|
- REPO_ARCH=arm64v8
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: publish-arm32v7
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: push
|
||||||
|
image: plugins/docker:20
|
||||||
|
settings:
|
||||||
|
username: asonix
|
||||||
|
password:
|
||||||
|
from_secret: dockerhub_token
|
||||||
|
repo: asonix/murmur
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm32v7
|
||||||
|
build_args:
|
||||||
|
- REPO_ARCH=arm32v7
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: manifest
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: manifest
|
||||||
|
image: plugins/manifest:1
|
||||||
|
settings:
|
||||||
|
username: asonix
|
||||||
|
password:
|
||||||
|
from_secret: dockerhub_token
|
||||||
|
dump: true
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: true
|
||||||
|
spec: manifest.tmpl
|
||||||
|
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- publish-amd64
|
||||||
|
- publish-arm64v8
|
||||||
|
- publish-arm32v7
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: cron
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tag
|
||||||
|
image: asonix/release-checker:0.1
|
||||||
|
pull: always
|
||||||
|
environment:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_token
|
||||||
|
commands:
|
||||||
|
- /usr/local/bin/release-checker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- custom
|
||||||
|
- cron
|
||||||
|
|
14
Check.toml
Normal file
14
Check.toml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[project]
|
||||||
|
kind = "alpine"
|
||||||
|
package = "murmur"
|
||||||
|
branch = "edge"
|
||||||
|
architectures = [
|
||||||
|
"x86_64",
|
||||||
|
"aarch64",
|
||||||
|
"armv7"
|
||||||
|
]
|
||||||
|
|
||||||
|
[gitea]
|
||||||
|
domain = "git.asonix.dog"
|
||||||
|
owner = "asonix"
|
||||||
|
repo = "docker-murmur"
|
36
Dockerfile
Normal file
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
ARG REPO_ARCH
|
||||||
|
|
||||||
|
FROM ${REPO_ARCH}/alpine:edge
|
||||||
|
|
||||||
|
ENV UID=991
|
||||||
|
ENV GID=991
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
mkdir /opt/murmur && \
|
||||||
|
addgroup --gid "$GID" murmur && \
|
||||||
|
adduser \
|
||||||
|
--disabled-password \
|
||||||
|
--gecos "" \
|
||||||
|
--home /opt/murmur \
|
||||||
|
--ingroup murmur \
|
||||||
|
--no-create-home \
|
||||||
|
--uid "$UID" \
|
||||||
|
murmur && \
|
||||||
|
chown -R murmur:murmur /opt/murmur && \
|
||||||
|
apk add murmur tini
|
||||||
|
|
||||||
|
RUN chown murmur:murmur /etc/murmur.ini
|
||||||
|
RUN ln -s /dev/stdout /var/log/murmur.log
|
||||||
|
|
||||||
|
COPY init.sh /usr/local/bin/init.sh
|
||||||
|
|
||||||
|
VOLUME /var/lib/murmur
|
||||||
|
|
||||||
|
EXPOSE 64738/tcp
|
||||||
|
EXPOSE 64738/udp
|
||||||
|
|
||||||
|
USER murmur
|
||||||
|
WORKDIR /opt/murmur
|
||||||
|
|
||||||
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
|
CMD ["init.sh", "murmurd"]
|
52
init.sh
Executable file
52
init.sh
Executable file
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
function require() {
|
||||||
|
if [ "$1" = "" ]; then
|
||||||
|
echo "required variable $2 missing, bailing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function optional() {
|
||||||
|
if [ "$1" = "" ]; then
|
||||||
|
echo "optional variable $2 missing, skipping"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function replace() {
|
||||||
|
sed "s/;*$1=.*/$1=$2/g" /etc/murmur.ini > /tmp/murmur.ini
|
||||||
|
cat /tmp/murmur.ini > /etc/murmur.ini
|
||||||
|
rm /tmp/murmur.ini
|
||||||
|
}
|
||||||
|
|
||||||
|
function optional_replace() {
|
||||||
|
if [ "$2" != "" ]; then
|
||||||
|
replace "$1" "$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
optional "$WELCOME_TEXT" "WELCOME_TEXT"
|
||||||
|
optional "$REGISTER_NAME" "REGISTER_NAME"
|
||||||
|
optional "$REGISTER_URL" "REGISTER_URL"
|
||||||
|
optional "$HOST" "HOST"
|
||||||
|
optional "$SERVER_PASSWORD" "SERVER_PASSWORD"
|
||||||
|
optional "$REGISTER_PASSWORD" "REGISTER_PASSWORD"
|
||||||
|
optional "$REGISTER_HOSTNAME" "REGISTER_HOSTNAME"
|
||||||
|
optional "$CERT_REQUIRED" "CERT_REQUIRED"
|
||||||
|
optional "$SSL_CERT_PATH" "SSL_CERT_PATH"
|
||||||
|
optional "$SSL_KEY_PATH" "SSL_KEY_PATH"
|
||||||
|
|
||||||
|
optional_replace "welcometext" "$WELCOME_TEXT"
|
||||||
|
optional_replace "registerName" "$REGISTER_NAME"
|
||||||
|
optional_replace "registerUrl" "$REGISTER_URL"
|
||||||
|
optional_replace "host" "$HOST"
|
||||||
|
optional_replace "serverpassword" "$SERVER_PASSWORD"
|
||||||
|
optional_replace "registerPassword" "$REGISTER_PASSWORD"
|
||||||
|
optional_replace "registerHostname" "$REGISTER_HOSTNAME"
|
||||||
|
optional_replace "certrequired" "$CERT_REQUIRED"
|
||||||
|
optional_replace "sslCert" "$SSL_CERT_PATH"
|
||||||
|
optional_replace "sslKey" "$SSL_KEY_PATH"
|
||||||
|
|
||||||
|
exec "$@"
|
19
manifest.tmpl
Normal file
19
manifest.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
image: asonix/murmur:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
|
manifests:
|
||||||
|
-
|
||||||
|
image: asonix/murmur:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
-
|
||||||
|
image: asonix/murmur:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64v8
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
variant: v8
|
||||||
|
-
|
||||||
|
image: asonix/murmur:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm32v7
|
||||||
|
platform:
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
variant: v7
|
Loading…
Reference in a new issue