commit
16cdbe1956
@ -1,19 +1,5 @@ |
|||||||
.git |
* |
||||||
.git/** |
!docker |
||||||
packager |
!bin |
||||||
packager/** |
!public |
||||||
scripts |
!templates |
||||||
scripts/** |
|
||||||
.github/ |
|
||||||
.github/** |
|
||||||
config.codekit |
|
||||||
.dockerignore |
|
||||||
*.yml |
|
||||||
*.md |
|
||||||
.bra.toml |
|
||||||
.editorconfig |
|
||||||
.gitignore |
|
||||||
Dockerfile* |
|
||||||
vendor |
|
||||||
vendor/** |
|
||||||
gogs |
|
||||||
|
@ -1 +1 @@ |
|||||||
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogY2VydCBzcWxpdGUgcGFtIG1pbml3aW5zdmMKICAgIGNvbW1hbmRzOgogICAgICAtIGFwayAtVSBhZGQgbGludXgtcGFtLWRldiBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgY2xlYW4KICAgICAgLSBtYWtlIHZldAogICAgICAjIC0gbWFrZSBsaW50CiAgICAgIC0gbWFrZSB0ZXN0CiAgICAgIC0gbWFrZSBidWlsZAogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCwgdGFnLCBwdWxsX3JlcXVlc3QgXQoKICB0ZXN0LW15c3FsOgogICAgaW1hZ2U6IHdlYmhpcHBpZS9nb2xhbmc6ZWRnZQogICAgcHVsbDogdHJ1ZQogICAgY29tbWFuZHM6CiAgICAgLSBtYWtlIHRlc3QtbXlzcWwKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2ggXQoKICB0ZXN0LXBnc3FsOgogICAgaW1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XRodWI6CiAgICBpbWFnZTogcGx1Z2lucy9naXRodWItcmVsZWFzZQogICAgZmlsZXM6CiAgICAgIC0gZGlzdC9yZWxlYXNlLyoKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHRhZyBdCiAgICAgIGJyYW5jaDogWyByZWZzL3RhZ3MvKiBdCgogIGdpdHRlcjoKICAgIGltYWdlOiBwbHVnaW5zL2dpdHRlcgoKc2VydmljZXM6CiAgbXlzcWw6CiAgICBpbWFnZTogbXlzcWw6NS43CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBNWVNRTF9EQVRBQkFTRT10ZXN0CiAgICAgIC0gTVlTUUxfQUxMT1dfRU1QVFlfUEFTU1dPUkQ9eWVzCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KCiAgcGdzcWw6CiAgICBpbWFnZTogcG9zdGdyZXM6OS41CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBQT1NUR1JFU19EQj10ZXN0CiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0K.W-dU1J1yWsWKPzQp5YvXtNAxoTa-vP_OkmBenzqR00c |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
export GITEA_CUSTOM=/data/gitea |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
exit 0 |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
exit 0 |
@ -0,0 +1,6 @@ |
|||||||
|
#!/bin/bash |
||||||
|
[[ -f ./setup ]] && source ./setup |
||||||
|
|
||||||
|
pushd /app/gitea > /dev/null |
||||||
|
exec su-exec git /app/gitea/gitea web |
||||||
|
popd |
@ -0,0 +1,19 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
if [ ! -d /data/git/.ssh ]; then |
||||||
|
mkdir -p /data/git/.ssh |
||||||
|
chmod 700 /data/git/.ssh |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/git/.ssh/environment ]; then |
||||||
|
echo "GITEA_CUSTOM=/data/gitea" >| /data/git/.ssh/environment |
||||||
|
chmod 600 /data/git/.ssh/environment |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/gitea/conf/app.ini ]; then |
||||||
|
mkdir -p /data/gitea/conf |
||||||
|
cp /etc/templates/app.ini /data/gitea/conf/app.ini |
||||||
|
fi |
||||||
|
|
||||||
|
chown -R git:git /data/gitea /app/gitea /data/git |
||||||
|
chmod 0755 /data/gitea /app/gitea /data/git |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
exit 0 |
@ -0,0 +1,6 @@ |
|||||||
|
#!/bin/bash |
||||||
|
[[ -f ./setup ]] && source ./setup |
||||||
|
|
||||||
|
pushd /root > /dev/null |
||||||
|
exec su-exec root /usr/sbin/sshd -E /var/log/sshd.log -D |
||||||
|
popd |
@ -0,0 +1,29 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
if [ ! -d /data/ssh ]; then |
||||||
|
mkdir -p /data/ssh |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/ssh/ssh_host_ed25519_key ]; then |
||||||
|
echo "Generating /data/ssh/ssh_host_ed25519_key..." |
||||||
|
ssh-keygen -t ed25519 -b 4096 -f /data/ssh/ssh_host_ed25519_key -N "" > /dev/null |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/ssh/ssh_host_rsa_key ]; then |
||||||
|
echo "Generating /data/ssh/ssh_host_rsa_key..." |
||||||
|
ssh-keygen -t rsa -b 2048 -f /data/ssh/ssh_host_rsa_key -N "" > /dev/null |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/ssh/ssh_host_dsa_key ]; then |
||||||
|
echo "Generating /data/ssh/ssh_host_dsa_key..." |
||||||
|
ssh-keygen -t dsa -f /data/ssh/ssh_host_dsa_key -N "" > /dev/null |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then |
||||||
|
echo "Generating /data/ssh/ssh_host_ecdsa_key..." |
||||||
|
ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null |
||||||
|
fi |
||||||
|
|
||||||
|
chown root:root /data/ssh/* |
||||||
|
chmod 0700 /data/ssh |
||||||
|
chmod 0600 /data/ssh/* |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
exit 0 |
@ -0,0 +1,6 @@ |
|||||||
|
#!/bin/bash |
||||||
|
[[ -f ./setup ]] && source ./setup |
||||||
|
|
||||||
|
pushd /root > /dev/null |
||||||
|
exec su-exec root /sbin/syslogd -nS -O- |
||||||
|
popd |
@ -0,0 +1 @@ |
|||||||
|
#!/bin/bash |
@ -1,16 +1,33 @@ |
|||||||
Port 22 |
Port 22 |
||||||
|
Protocol 2 |
||||||
|
|
||||||
AddressFamily any |
AddressFamily any |
||||||
ListenAddress 0.0.0.0 |
ListenAddress 0.0.0.0 |
||||||
ListenAddress :: |
ListenAddress :: |
||||||
Protocol 2 |
|
||||||
LogLevel INFO |
LogLevel INFO |
||||||
|
|
||||||
|
HostKey /data/ssh/ssh_host_ed25519_key |
||||||
HostKey /data/ssh/ssh_host_rsa_key |
HostKey /data/ssh/ssh_host_rsa_key |
||||||
HostKey /data/ssh/ssh_host_dsa_key |
HostKey /data/ssh/ssh_host_dsa_key |
||||||
HostKey /data/ssh/ssh_host_ecdsa_key |
HostKey /data/ssh/ssh_host_ecdsa_key |
||||||
HostKey /data/ssh/ssh_host_ed25519_key |
|
||||||
|
AuthorizedKeysFile .ssh/authorized_keys |
||||||
|
|
||||||
|
UseDNS no |
||||||
|
AllowAgentForwarding no |
||||||
|
AllowTcpForwarding no |
||||||
|
PrintMotd no |
||||||
|
PrintLastLog no |
||||||
|
|
||||||
|
PermitUserEnvironment yes |
||||||
PermitRootLogin no |
PermitRootLogin no |
||||||
AuthorizedKeysFile .ssh/authorized_keys |
ChallengeResponseAuthentication no |
||||||
PasswordAuthentication no |
PasswordAuthentication no |
||||||
UsePrivilegeSeparation no |
PermitEmptyPasswords no |
||||||
PermitUserEnvironment yes |
|
||||||
AllowUsers git |
AllowUsers git |
||||||
|
|
||||||
|
Banner none |
||||||
|
Subsystem sftp /usr/lib/ssh/sftp-server |
||||||
|
UsePrivilegeSeparation no |
@ -0,0 +1,24 @@ |
|||||||
|
[repository] |
||||||
|
ROOT = /data/git/repositories |
||||||
|
|
||||||
|
[repository.upload] |
||||||
|
TEMP_PATH = /data/gitea/uploads |
||||||
|
|
||||||
|
[server] |
||||||
|
APP_DATA_PATH = /data/gitea |
||||||
|
|
||||||
|
[database] |
||||||
|
HOST = mysql:3306 |
||||||
|
PATH = /data/gitea/gitea.db |
||||||
|
|
||||||
|
[session] |
||||||
|
PROVIDER_CONFIG = /data/gitea/sessions |
||||||
|
|
||||||
|
[picture] |
||||||
|
AVATAR_UPLOAD_PATH = /data/gitea/avatars |
||||||
|
|
||||||
|
[attachment] |
||||||
|
PATH = /data/gitea/attachments |
||||||
|
|
||||||
|
[log] |
||||||
|
ROOT_PATH = /data/gitea/log |
@ -1,9 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
# Crontabs are located by default in /var/spool/cron/crontabs/ |
|
||||||
# The default configuration is also calling all the scripts in /etc/periodic/${period} |
|
||||||
|
|
||||||
if test -f ./setup; then |
|
||||||
source ./setup |
|
||||||
fi |
|
||||||
|
|
||||||
exec gosu root /usr/sbin/crond -fS |
|
@ -1,8 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
|
|
||||||
if test -f ./setup; then |
|
||||||
source ./setup |
|
||||||
fi |
|
||||||
|
|
||||||
export USER=git |
|
||||||
exec gosu $USER /app/gogs/gogs web |
|
@ -1,7 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
|
|
||||||
if test -f ./setup; then |
|
||||||
source ./setup |
|
||||||
fi |
|
||||||
|
|
||||||
exec gosu root /usr/sbin/sshd -D -f /app/gogs/docker/sshd_config |
|
@ -1,7 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
|
|
||||||
if test -f ./setup; then |
|
||||||
source ./setup |
|
||||||
fi |
|
||||||
|
|
||||||
exec gosu root /sbin/syslogd -nS -O- |
|
@ -0,0 +1,11 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do |
||||||
|
mkdir -p ${FOLDER} |
||||||
|
done |
||||||
|
|
||||||
|
if [ $# -gt 0 ]; then |
||||||
|
exec "$@" |
||||||
|
else |
||||||
|
exec /bin/s6-svscan /etc/s6 |
||||||
|
fi |
Loading…
Reference in new issue