Initial commit

This commit is contained in:
2020-06-27 15:56:54 +02:00
commit c3200c91db
65 changed files with 2701 additions and 0 deletions
@@ -0,0 +1,3 @@
function gitea
env GITEA_WORK_DIR=$HOME/gitea ~/.linuxbrew/bin/gitea $argv
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1 @@
<svg width="1000" height="1000" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M591.655 0a504.542 504.542 0 0178.979 21.11l-12.775 135.521a377.428 377.428 0 0160.526 35.013l110.923-78.783a511.365 511.365 0 0157.832 57.832l-78.783 110.922a377.428 377.428 0 0135.012 60.526l135.52-12.775A504.542 504.542 0 011000 408.345l-123.768 56.707A382.582 382.582 0 01877.827 500c0 11.784-.54 23.441-1.595 34.95L1000 591.654a504.542 504.542 0 01-21.11 78.979l-135.52-12.775a377.428 377.428 0 01-35.013 60.526l78.783 110.922a511.365 511.365 0 01-57.833 57.833l-110.922-78.784a377.428 377.428 0 01-60.526 35.013l12.775 135.52A504.542 504.542 0 01591.655 1000l-56.707-123.77a382.582 382.582 0 01-34.947 1.596c-11.783 0-23.44-.54-34.948-1.595L408.345 1000a504.542 504.542 0 01-78.979-21.11l12.775-135.522a377.428 377.428 0 01-60.525-35.012L170.693 887.14a511.365 511.365 0 01-57.832-57.832l78.783-110.925a377.428 377.428 0 01-35.011-60.524L21.11 670.634A504.542 504.542 0 010 591.655l123.77-56.707A382.582 382.582 0 01122.175 500c0-11.783.54-23.44 1.595-34.947L0 408.345a504.542 504.542 0 0121.11-78.979l135.523 12.775a377.428 377.428 0 0135.011-60.524L112.86 170.693a511.365 511.365 0 0157.833-57.833l110.923 78.784a377.428 377.428 0 0160.525-35.012L329.366 21.11A504.542 504.542 0 01408.345 0l56.708 123.77A382.582 382.582 0 01500 122.173c11.783 0 23.44.54 34.947 1.595L591.655 0zm-91.654 241.084c-142.995 0-258.916 115.92-258.916 258.916 0 142.995 115.92 258.916 258.916 258.916 142.995 0 258.916-115.92 258.916-258.916 0-142.995-115.92-258.916-258.916-258.916z" fill="#000"/><path stroke="#000" stroke-width="57.537" d="M500.5 347l132.935 76.75v153.5L500.5 654l-132.935-76.75v-153.5z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,24 @@
<footer>
<div class="ui container">
<div class="ui left">
© Lukas Bestle
</div>
<div class="ui right links">
{{if .ShowFooterBranding}}
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
{{end}}
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">{{.LangName}}</div>
<div class="menu">
{{range .AllLangs}}
<a class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
{{end}}
</div>
</div>
<a target="_blank" href="https://codesignd.com">{{.i18n.Tr "website"}}</a>
<a target="_blank" href="https://codesignd.com/legal">Imprint</a>
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
</div>
</div>
</footer>
@@ -0,0 +1,133 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/">
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
{{if .IsSigned}}
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
{{end}}
{{template "custom/extra_links" .}}
{{/*
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div>
*/}}
{{if .IsSigned}}
<div class="right stackable menu">
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<i class="fitted octicon octicon-bell"></i>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
{{if .NotificationUnreadCount}}
<span class="ui red label">
{{.NotificationUnreadCount}}
</span>
{{end}}
</span>
</a>
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<i class="fitted octicon octicon-plus"></i>
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
<i class="fitted octicon octicon-triangle-down not-mobile"></i>
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<i class="fitted octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<i class="fitted octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
</a>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<i class="fitted octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
<img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>
<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
<i class="octicon octicon-person"></i>
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
<i class="octicon octicon-star"></i>
{{.i18n.Tr "your_starred"}}
</a>
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
<i class="octicon octicon-settings"></i>
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
<i class="octicon octicon-question"></i>
{{.i18n.Tr "help"}}<!-- Help -->
</a>
{{if .IsAdmin}}
<div class="divider"></div>
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
<i class="icon settings"></i>
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
</a>
{{end}}
<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/user/logout">
<i class="octicon octicon-sign-out"></i>
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->
{{else}}
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
</a>
{{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
<i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->
{{end}}
</div>
+8
View File
@@ -0,0 +1,8 @@
---
- name: Reread service config
command: supervisorctl reread
- name: Restart Gitea
supervisorctl:
name: gitea
state: restarted
+47
View File
@@ -0,0 +1,47 @@
---
- name: Add Git domain to Uberspace config
import_role:
name: snapstromegon.uberspace_web_domain
vars:
domain: git.codesignd.com
- name: Copy config to home directory
copy:
src: home/
dest: "{{ ansible_env.HOME }}/"
mode: preserve
tags: gitea-update
notify: Restart Gitea
- name: Copy service config
template:
src: service.ini.j2
dest: "{{ ansible_env.HOME }}/etc/services.d/gitea.ini"
notify: Reread service config
- name: Copy app config
template:
src: app.ini.j2
dest: "{{ ansible_env.HOME }}/gitea/custom/conf/app.ini"
tags: gitea-update
notify: Restart Gitea
- name: Configure web backend
import_role:
name: snapstromegon.uberspace_web_backend
vars:
route: git.codesignd.com
http:
port: 8080
- name: Set up Gitea Homebrew tap
homebrew_tap:
name: gitea/tap
url: https://gitea.com/gitea/homebrew-gitea.git
- name: Install and update Gitea
homebrew:
name: gitea
state: latest
notify: Restart Gitea
tags: gitea-update
+73
View File
@@ -0,0 +1,73 @@
; Config last updated based on:
; commit: bcb722daec4bdd45303da97173a2b8a3c4c95dcd
; date: 2020-01-19
APP_NAME = codesignd Git
RUN_USER = {{ ansible_user_id }}
RUN_MODE = prod
; Server settings
; ===============
[server]
PROTOCOL = http
DOMAIN = git.codesignd.com
HTTP_PORT = 8080
ROOT_URL = https://%(DOMAIN)s/
SSH_PORT = 22
OFFLINE_MODE = true
ENABLE_GZIP = true
LANDING_PAGE = explore
[security]
INSTALL_LOCK = true
SECRET_KEY = {{ git_secret_key }}
INTERNAL_TOKEN = {{ git_internal_token }}
PASSWORD_COMPLEXITY = off
[oauth2]
JWT_SECRET = {{ git_jwt_secret }}
; Paths
; =====
[database]
DB_TYPE = sqlite3
PATH = /home/%(RUN_USER)s/gitea/data/gitea.db
[repository]
ROOT = /home/%(RUN_USER)s/gitea/repos
; Functionality settings
; ======================
[admin]
DISABLE_REGULAR_ORG_CREATION = true
[log]
MODE = file
LEVEL = Info
[mailer]
ENABLED = true
FROM = %(APP_NAME)s <git@codesignd.com>
MAILER_TYPE = sendmail
[service]
DISABLE_REGISTRATION = true
ENABLE_NOTIFY_MAIL = true
NO_REPLY_ADDRESS = noreply.codesignd.com
[session]
COOKIE_SECURE = true
; Branding
; ========
[ui]
THEME_COLOR_META_TAG = `#eb8e2e`
[other]
SHOW_FOOTER_BRANDING = false
SHOW_FOOTER_VERSION = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
+5
View File
@@ -0,0 +1,5 @@
[program:gitea]
command={{ ansible_env.HOME }}/.linuxbrew/bin/gitea web
environment=GITEA_WORK_DIR={{ ansible_env.HOME }}/gitea
autostart=yes
autorestart=yes