dev-util/reposilite: Add untested ebuild for version 2.9.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Package-Manager: Portage-3.0.4, Repoman-3.0.1
This commit is contained in:
Manuel Friedli 2020-10-08 23:21:07 +02:00
parent 0e632a1ee4
commit 95b2c95d55
8 changed files with 194 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# Reposilite docker configuration file.
# Required string value configures ports to publish for docker: space-separated
# list of <hostport>:<containerport> tuples.
DOCKER_PUBLISH="8080:80 8443:443"
# Put any Java-specific configuration in the JAVA_OPTS environment
# variable, e.g. JAVA_OPTS='-Xmx64M'.
# For details and available config options, see
# https://reposilite.com/docs/docker
JAVA_OPTS=''
# Do NOT remove or change the --config option; you may add more options, though.
# For available options, see https://reposilite.com/docs/install#properties
REPOSILITE_OPTS="--config=/app/reposilite-host.cdn"
# Optional string value of extra args passed verbatim to the docker command.
DOCKER_DRONE_EXTRA_ARGS=""

View file

@ -0,0 +1,56 @@
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Reposilite #
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Hostname
hostname: 0.0.0.0
# Port to bind
port: 80
# Custom base path
basePath: /
# Any kind of proxy services change real ip.
# The origin ip should be available in one of the headers.
# Nginx: X-Forwarded-For
# Cloudflare: CF-Connecting-IP
# Popular: X-Real-IP
forwardedIp: X-Forwarded-For
# Debug
debugEnabled: false
# Control the maximum amount of data assigned to Reposilite instance
# Supported formats: 90%, 500MB, 10GB
diskQuota: 10GB
# List of supported Maven repositories.
# First directory on the list is the main (primary) repository.
# Tu mark repository as private, prefix its name with a dot, e.g. ".private"
repositories [
releases
snapshots
.private
]
# Allow to omit name of the main repository in request
# e.g. /org/panda-lang/reposilite will be redirected to /releases/org/panda-lang/reposilite
rewritePathsEnabled: true
# List of proxied repositories.
# Reposilite will search for an artifact in remote repositories listed below,
# if the requested artifact was not found.
proxied [
]
# Reposilite can store proxied artifacts locally to reduce response time and improve stability
storeProxied: true
# Accept deployment connections
deployEnabled: true
# List of management tokens used by dashboard to access extra options.
# (By default, people are allowed to use standard dashboard options related to the associated path)
managers [
admin
]
# Title displayed by frontend
title: #onlypanda
# Description displayed by frontend
description: Public Maven repository hosted through the Reposilite
# Accent color used by frontend
accentColor: #2fd4aa

View file

@ -0,0 +1,24 @@
[Unit]
Description=Reposilite Maven Repository hosting server
Documentation=https://reposilite.com/docs/about
AssertPathIsDirectory=/var/lib/reposilite-data
AssertPathIsReadWrite=/var/lib/reposilite-data
After=network.target
Requires=network.target
[Service]
User=reposilite
Group=reposilite
Environment="DOCKER_REPOSILITE_CONFIG_FILE=/etc/reposilite/app.ini"
ExecStart=reposilite.sh
ExecStop=docker container stop reposilite
ExecStopPost=docker container rm reposilite
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,27 @@
#!/bin/sh
# $DOCKER_REPOSILITE_CONFIG_FILE contains path to the config file
if [[ -z "${DOCKER_REPOSILITE_CONFIG_FILE}" ]] ; then
echo "DOCKER_REPOSILITE_CONFIG_FILE not set!"
exit 1
fi
. "${DOCKER_REPOSILITE_CONFIG_FILE}"
docker_args="--environment=REPOSILITE_OPTS='${REPOSILITE_OPTS}'"
docker_args="${docker_args} --environment=JAVA_OPTS='${JAVA_OPTS}'"
for p in ${DOCKER_PUBLISH} ; do
docker_args="${docker_args} --publish=${p}"
done
docker_args="${docker_args} ${DOCKER_REPOSILITE_EXTRA_ARGS}"
docker run \
--mount type=bind,source=/etc/reposilite/reposilite.cdn,target=/app/reposilite-host.cdn
--volume=/var/lib/reposilite-data:/app/data \
${docker_args} \
--restart=always \
--detach=false \
--name=reposilite \
dzikoysk/reposilite:<VERSION>