Skip to content

Commit 52da1c9

Browse files
author
willemvd
committed
use new gitea docker image as base image and customize a few files (and this time with some missing files..)
1 parent 755c84c commit 52da1c9

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

docker/etc/s6/gitea/run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
[[ -f ./setup ]] && source ./setup
3+
4+
#pushd /app/gitea > /dev/null
5+
exec /app/gitea/gitea web
6+
#popd

docker/etc/s6/gitea/setup

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
if [ ! -d /data/git/.ssh ]; then
4+
mkdir -p /data/git/.ssh
5+
chmod 700 /data/git/.ssh
6+
fi
7+
8+
if [ ! -f /data/git/.ssh/environment ]; then
9+
echo "GITEA_CUSTOM=/data/gitea" >| /data/git/.ssh/environment
10+
chmod 600 /data/git/.ssh/environment
11+
fi
12+
13+
if [ ! -f /data/gitea/conf/app.ini ]; then
14+
mkdir -p /data/gitea/conf
15+
cp /etc/templates/app.ini /data/gitea/conf/app.ini
16+
fi
17+
18+
chown -R git:root /data/gitea /data/git
19+
chmod 0755 /data/gitea /data/git

docker/etc/s6/openssh/run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
[[ -f ./setup ]] && source ./setup
3+
4+
#pushd /root > /dev/null
5+
exec /usr/sbin/sshd -De
6+
#popd

docker/etc/s6/openssh/setup

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
if [ ! -d /data/ssh ]; then
4+
mkdir -p /data/ssh
5+
fi
6+
7+
if [ ! -f /data/ssh/ssh_host_ed25519_key ]; then
8+
echo "Generating /data/ssh/ssh_host_ed25519_key..."
9+
ssh-keygen -t ed25519 -b 4096 -f /data/ssh/ssh_host_ed25519_key -N "" > /dev/null
10+
fi
11+
12+
if [ ! -f /data/ssh/ssh_host_rsa_key ]; then
13+
echo "Generating /data/ssh/ssh_host_rsa_key..."
14+
ssh-keygen -t rsa -b 2048 -f /data/ssh/ssh_host_rsa_key -N "" > /dev/null
15+
fi
16+
17+
if [ ! -f /data/ssh/ssh_host_dsa_key ]; then
18+
echo "Generating /data/ssh/ssh_host_dsa_key..."
19+
ssh-keygen -t dsa -f /data/ssh/ssh_host_dsa_key -N "" > /dev/null
20+
fi
21+
22+
if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then
23+
echo "Generating /data/ssh/ssh_host_ecdsa_key..."
24+
ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null
25+
fi
26+
27+
chmod 0700 /data/ssh
28+
chmod 0600 /data/ssh/*

docker/etc/templates/app.ini

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[repository]
2+
ROOT = /data/git/repositories
3+
4+
[repository.upload]
5+
TEMP_PATH = /data/gitea/uploads
6+
7+
[server]
8+
APP_DATA_PATH = /data/gitea
9+
10+
[database]
11+
HOST = mysql:3306
12+
PATH = /data/gitea/gitea.db
13+
14+
[session]
15+
PROVIDER_CONFIG = /data/gitea/sessions
16+
17+
[picture]
18+
AVATAR_UPLOAD_PATH = /data/gitea/avatars
19+
20+
[attachment]
21+
PATH = /data/gitea/attachments
22+
23+
[log]
24+
ROOT_PATH = /data/gitea/log
25+
MODE = file, console
26+

0 commit comments

Comments
 (0)