diff --git a/image/Dockerfile b/image/Dockerfile new file mode 100644 index 0000000..d332842 --- /dev/null +++ b/image/Dockerfile @@ -0,0 +1,15 @@ +FROM gitea/gitea:latest + +RUN apk add aws-cli xz + +ADD --chown=git:git custom /data/gitea +ADD --chown=git:git entrypoint.sh /home/entrypoint.sh + +ADD --chown=git:git scripts /home/scripts +RUN chmod +x /home/scripts/* + +ADD --chown=git:git crontab.txt /home/crontab.txt +RUN /usr/bin/crontab /home/crontab.txt + +ENTRYPOINT [ "/home/entrypoint.sh" ] +CMD [ "/usr/bin/s6-svscan", "/etc/s6" ] \ No newline at end of file diff --git a/image/Dockerfile.dev b/image/Dockerfile.dev new file mode 100644 index 0000000..a141218 --- /dev/null +++ b/image/Dockerfile.dev @@ -0,0 +1,18 @@ +FROM gitea/gitea:latest + +RUN apk add aws-cli xz + +ADD --chown=git:git custom /data/gitea +ADD --chown=git:git entrypoint.sh /home/entrypoint.sh + +ADD --chown=git:git scripts /home/scripts +RUN chmod +x /home/scripts/* + +ADD --chown=git:git crontab.txt /home/crontab.txt +RUN /usr/bin/crontab /home/crontab.txt + +RUN rm /data/gitea/conf/app.ini +RUN mv /data/gitea/conf/dev.app.ini /data/gitea/conf/app.ini + +ENTRYPOINT [ "/home/entrypoint.sh" ] +CMD [ "/usr/bin/s6-svscan", "/etc/s6" ] \ No newline at end of file diff --git a/image/crontab.txt b/image/crontab.txt new file mode 100644 index 0000000..04ff1ea --- /dev/null +++ b/image/crontab.txt @@ -0,0 +1 @@ +0 0 * * * /home/scripts/push.sh >> /home/cron.log diff --git a/image/custom/conf/app.ini b/image/custom/conf/app.ini new file mode 100644 index 0000000..c2415b5 --- /dev/null +++ b/image/custom/conf/app.ini @@ -0,0 +1,91 @@ +APP_NAME = """Max's Code""" +RUN_USER = git +RUN_MODE = prod +WORK_PATH = /var/lib/gitea + +[ui] +DEFAULT_THEME = gitea-dark + +[repository] +ROOT = /var/lib/gitea/git/repositories + +[repository.local] +LOCAL_COPY_PATH = /tmp/gitea/local-repo + +[repository.upload] +TEMP_PATH = /tmp/gitea/uploads + +[server] +APP_DATA_PATH = /var/lib/gitea +LFS_START_SERVER = true +OFFLINE_MODE = true + +DISABLE_SSH = false +START_SSH_SERVER = true +SSH_PORT = 22 +SSH_LISTEN_PORT = 2222 +SSH_DOMAIN = maximhutz.com +BUILTIN_SSH_SERVER_USER = git + +DOMAIN = code.maximhutz.com +ROOT_URL = https://code.maximhutz.com/ +HTTP_PORT = 80 + +[database] +DB_TYPE = sqlite3 + +[session] +PROVIDER_CONFIG = /var/lib/gitea/data/sessions +PROVIDER = file +GC_INTERVAL_TIME = 86400 +SESSION_LIFE_TIME = 86400 + +[picture] +AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/repo-avatars + +[attachment] +PATH = /var/lib/gitea/data/attachments + +[log] +ROOT_PATH = /var/lib/gitea/data/log +MODE = console +LEVEL = info + +[security] +INSTALL_LOCK = true +SECRET_KEY = +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = * +PASSWORD_HASH_ALGO = pbkdf2 + +[service] +DISABLE_REGISTRATION = true +REQUIRE_SIGNIN_VIEW = false +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +ALLOW_ONLY_EXTERNAL_REGISTRATION = false +ENABLE_CAPTCHA = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +DEFAULT_ENABLE_TIMETRACKING = true +NO_REPLY_ADDRESS = noreply + +[lfs] +PATH = /var/lib/gitea/git/lfs + +[mailer] +ENABLED = false + +[openid] +ENABLE_OPENID_SIGNIN = false +ENABLE_OPENID_SIGNUP = false + +[cron.update_checker] +ENABLED = false + +[repository.pull-request] +DEFAULT_MERGE_STYLE = merge + +[repository.signing] +DEFAULT_TRUST_MODEL = committer diff --git a/image/custom/conf/dev.app.ini b/image/custom/conf/dev.app.ini new file mode 100644 index 0000000..3e421ee --- /dev/null +++ b/image/custom/conf/dev.app.ini @@ -0,0 +1,92 @@ +APP_NAME = """Max's Code""" +RUN_USER = git +RUN_MODE = prod +WORK_PATH = /var/lib/gitea + +[ui] +DEFAULT_THEME = gitea-dark + +[repository] +ROOT = /var/lib/gitea/git/repositories + +[repository.local] +LOCAL_COPY_PATH = /tmp/gitea/local-repo + +[repository.upload] +TEMP_PATH = /tmp/gitea/uploads + +[server] +APP_DATA_PATH = /var/lib/gitea +DISABLE_SSH = false +START_SSH_SERVER = true +SSH_PORT = 2222 +SSH_LISTEN_PORT = 2222 +BUILTIN_SSH_SERVER_USER = git +LFS_START_SERVER = true +OFFLINE_MODE = true +SSH_DOMAIN = localhost +DOMAIN = localhost +ROOT_URL = http://localhost:80/ +HTTP_PORT = 80 +LFS_JWT_SECRET = x-----------------------------------------x + +[database] +DB_TYPE = sqlite3 + +[session] +PROVIDER_CONFIG = /var/lib/gitea/data/sessions +PROVIDER = file + +[picture] +AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/repo-avatars + +[attachment] +PATH = /var/lib/gitea/data/attachments + +[log] +ROOT_PATH = /var/lib/gitea/data/log +MODE = console +LEVEL = info + +[security] +INSTALL_LOCK = true +SECRET_KEY = +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = * +PASSWORD_HASH_ALGO = pbkdf2 +INTERNAL_TOKEN = x-----------------------------------------x + +[service] +DISABLE_REGISTRATION = true +REQUIRE_SIGNIN_VIEW = false +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +ALLOW_ONLY_EXTERNAL_REGISTRATION = false +ENABLE_CAPTCHA = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +DEFAULT_ENABLE_TIMETRACKING = true +NO_REPLY_ADDRESS = noreply + +[lfs] +PATH = /var/lib/gitea/git/lfs + +[mailer] +ENABLED = false + +[openid] +ENABLE_OPENID_SIGNIN = false +ENABLE_OPENID_SIGNUP = false + +[cron.update_checker] +ENABLED = false + +[repository.pull-request] +DEFAULT_MERGE_STYLE = merge + +[repository.signing] +DEFAULT_TRUST_MODEL = committer + +[oauth2] +JWT_SECRET = x-----------------------------------------x diff --git a/image/custom/public/assets/img/apple-touch-icon.png b/image/custom/public/assets/img/apple-touch-icon.png new file mode 100644 index 0000000..51f4ae5 Binary files /dev/null and b/image/custom/public/assets/img/apple-touch-icon.png differ diff --git a/image/custom/public/assets/img/favicon.png b/image/custom/public/assets/img/favicon.png new file mode 100644 index 0000000..51f4ae5 Binary files /dev/null and b/image/custom/public/assets/img/favicon.png differ diff --git a/image/custom/public/assets/img/favicon.svg b/image/custom/public/assets/img/favicon.svg new file mode 100644 index 0000000..5bf444b --- /dev/null +++ b/image/custom/public/assets/img/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/image/custom/public/assets/img/logo.png b/image/custom/public/assets/img/logo.png new file mode 100644 index 0000000..51f4ae5 Binary files /dev/null and b/image/custom/public/assets/img/logo.png differ diff --git a/image/custom/public/assets/img/logo.svg b/image/custom/public/assets/img/logo.svg new file mode 100644 index 0000000..5bf444b --- /dev/null +++ b/image/custom/public/assets/img/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/image/custom/templates/base/head.tmpl b/image/custom/templates/base/head.tmpl new file mode 100644 index 0000000..0721e0b --- /dev/null +++ b/image/custom/templates/base/head.tmpl @@ -0,0 +1,49 @@ + + +
+ +