Compare commits

...

24 Commits

Author SHA1 Message Date
Matthias Kretschmann a2915cc160
homepage tweaks 2024-02-02 18:50:10 +00:00
Matthias Kretschmann ce63e43aa3
fix logo replacement 2024-02-02 16:59:28 +00:00
Matthias Kretschmann 0f7ae21beb
simplify styling 2024-02-02 15:12:46 +00:00
Matthias Kretschmann eeb9b9afb0
updates 2022-11-17 18:52:11 +00:00
Matthias Kretschmann c471a1e91e asset changes 2021-09-20 01:08:04 +02:00
Matthias Kretschmann e94a442c8b asset renaming 2021-09-19 22:28:41 +02:00
Matthias Kretschmann 379e08a2d1
update script tweaks 2020-03-13 17:32:23 +01:00
Matthias Kretschmann 77168b4b56
dark theme updates 2018-12-15 20:55:04 +01:00
Matthias Kretschmann 65e773059f
Merge branch 'master' of git.berlin:m/git.berlin 2018-12-15 20:26:55 +01:00
Matthias Kretschmann 87ed222053
large favicon 2018-12-15 20:26:50 +01:00
Matthias Kretschmann f0d1515dd5
fix overflow menu in dark theme 2018-12-15 20:19:34 +01:00
Matthias Kretschmann a88ae00b91 Update 'README.md' 2018-12-15 20:11:23 +01:00
Matthias Kretschmann da1c7d76ac
option cleanup 2018-12-15 20:09:22 +01:00
Matthias Kretschmann fa6c3b8bb2
document update script 2018-12-15 19:58:02 +01:00
Matthias Kretschmann b8a3de6445
service commands 2018-12-15 19:38:23 +01:00
Matthias Kretschmann a2499df668
add favicon 2018-12-15 19:36:54 +01:00
Matthias Kretschmann a23f2aca69
update script 2018-12-12 22:31:15 +01:00
Matthias Kretschmann 489c3d1bbc
style tweaks 2018-12-07 20:16:38 +01:00
Matthias Kretschmann cedff2c007 Update 'README.md' 2018-12-07 16:39:10 +01:00
Matthias Kretschmann 057d6755cc
docs update 2018-12-07 16:37:28 +01:00
Matthias Kretschmann e49a55498f
gitea files deployment 2018-12-07 16:21:13 +01:00
Matthias Kretschmann 83a6062be6 Update 'README.md' 2018-12-04 02:40:54 +01:00
Matthias Kretschmann db6722b761
add gitlab migration script 2018-12-04 02:38:55 +01:00
Matthias Kretschmann e89d838ef4
move to Gitea 2018-12-04 02:31:39 +01:00
25 changed files with 10817 additions and 295 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
node_modules
key.json
yarn.lock
node_modules

8
.prettierrc Normal file
View File

@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 4,
"endOfLine": "lf"
}

View File

@ -1,40 +1,72 @@
<img align="left" src="logo-gitberlin-header.png" height="100">
## git.berlin
<img src="https://git.berlin/m/git.berlin/raw/branch/master/assets/logo-gitberlin.png" height="100">
[www.git.berlin](https://www.git.berlin) | git:git.berlin
# git.berlin
> Gitea installation notes [git.berlin](https://git.berlin)
- [Migration from GitLab](#migration-from-gitlab)
- [Update Gitea](#update-gitea)
- [Customization](#customization)
- [Handy commands](#handy-commands)
- [Gitea Documentation](#gitea-documentation)
---
## Config
## Migration from GitLab
- [Appearance](appearance.md)
- [Directories](directories.md)
- do monitor config template changes: https://gitlab.com/gitlab-org/omnibus-gitlab/commits/master/files/gitlab-config-template/gitlab.rb.template
- [`bin/migrate-gitlab-gitea.sh`](bin/migrate-gitlab-gitea.sh)
## Documentation
## Update Gitea
- http://doc.gitlab.com/omnibus/
- https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master/doc
- https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc
```bash
# run update script, passing version number as option
./bin/update-gitea.sh 1.6.1
```
Update script sets options by default, can be changed at top of script:
| Option | Default | Description |
| ------------- | ------------- | ------------- |
| `giteaBinary` | `/home/git/gitea/gitea` | Gitea binary path |
| `arch` | `linux-amd64` | Server architecture |
| `giteaStore` | `/home/git/gitea-update` | Directory where update files will be stored |
| `giteaUser` | `git` | linux user Gitea is running under |
| `giteaGroup` | `git` | linux group Gitea is running under |
- [`bin/update-gitea.sh`](bin/update-gitea.sh)
## Customization
The `custom/` folder maps to `/home/git/gitea/custom/` on the server. Its contents can be deployed via rsync with:
```bash
npm i
npm run deploy
```
[Gitea Docs: Customizing Gitea](https://docs.gitea.io/en-us/customizing-gitea/)
## Handy commands
```bash
cd /etc/gitlab/
cd /var/opt/gitlab/
sudo su git
cd /home/git
# reconfigure all the things
sudo gitlab-ctl reconfigure
vi gitea/custom/conf/app.ini
# restart all the things
sudo gitlab-ctl restart
# Backup
# https://docs.gitea.io/en-us/backup-and-restore/
sudo su git
./gitea dump -c gitea/custom/conf/app.ini
# run checks
sudo gitlab-rake gitlab:check
# Restart Gitea service
sudo service gitea restart
# clean all the things
sudo gitlab-rake assets:clean assets:precompile cache:clear
# backup
sudo gitlab-rake gitlab:backup:create
# nginx
sudo vi /etc/nginx/sites-enabled/gitea
sudo service nginx restart
```
## Gitea Documentation
- [docs.gitea.io](https://docs.gitea.io/)

View File

@ -1,14 +0,0 @@
# git.berlin
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ <br>
░ ░ ░ Maintained by [@kremalicious](https://matthiaskretschmann.com) <br>
░ ░ ░ `>` [explore public repositories](https://www.git.berlin/explore/projects)<br>
░ ░ ░ ░ ░ ░ ░ ░ ░ <br>
░ ░ ░ ░ ░ ░ ░<br>
░ ░ ░ ░ ░ <br>
░ ░ ░ <br>
![logo](logo-gitberlin.png)
![logo-header](logo-gitberlin-header.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
assets/logo.sketch Normal file

Binary file not shown.

5
assets/logo.svg Normal file
View File

@ -0,0 +1,5 @@
<svg id="logo-gitberlin" viewBox="0 0 115 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g fill="#C0CED3">
<path d="M78.0192954,168.596418 C73.6220556,179.722758 64.2844708,186.142587 48.5518727,193.374879 C44.0643811,195.228368 39.6589412,197.407435 35.1186783,199.643703 L33.3275857,139.642102 L36.9097709,139.642102 L36.9097709,128.895546 L32.4320394,128.895546 L32.4320394,124.417815 C42.8765972,122.048958 50.556092,112.908921 50.3429652,102.029158 C50.556092,91.2271563 43.9283386,82.3649534 34.223132,78.744954 L34.223132,57.251843 L30.6409468,56.3562967 L30.6409468,50.983019 L28.8498543,49.1919264 L27.954308,4.41461182 L26.1632154,4.41461182 L24.3721228,4.41461182 L23.4765765,49.1919264 L21.6854839,50.983019 L21.6854839,56.3562967 L18.1032988,57.251843 L18.1032988,78.744954 C8.61121895,82.3578294 1.98346553,91.2235944 1.98346553,102.029158 C1.98346553,112.905359 9.66296035,122.045396 19.8943913,124.417815 L19.8943913,128.895546 L15.4166599,128.895546 L15.4166599,139.642102 L18.9988451,139.642102 L13.6255673,251.585388 L38.7008635,251.585388 L36.0142246,222.927907 C39.5275371,218.866822 46.6381547,215.435089 56.6117893,211.285805 C75.6361855,202.274343 91.7641216,189.758951 96.8874971,159.485798 L99.5980113,159.485798 L99.5980113,148.739243 L95.1202798,148.739243 L95.1202798,144.261511 C105.564838,141.892655 113.244332,132.752617 113.031206,121.872854 C113.244332,111.070853 106.616579,102.20865 96.9113724,98.5886506 L96.9113724,77.0955396 L93.3291872,76.1999933 L93.3291872,70.8267156 L91.5380946,69.035623 L90.6425484,24.2583084 L88.8514558,24.2583084 L87.0603632,24.2583084 L86.1648169,69.035623 L84.3737243,70.8267156 L84.3737243,76.1999933 L80.7915391,77.0955396 L80.7915391,98.5886506 C71.2994593,102.201526 64.6717059,111.067291 64.6717059,121.872854 C64.6717059,132.749055 72.3512007,141.889093 82.5826317,144.261511 L82.5826317,148.739243 L78.1049003,148.739243 L78.1049003,159.485798 L80.7591713,159.485798 C79.9856238,162.859581 79.0970526,165.869367 78.0192954,168.596418 Z"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,64 @@
#!/bin/sh
# https://gist.github.com/gregdel/870d58c80b80172445dc93294531d88c
#
# brew install jq
#
set -e
_usage() {
echo "Usage: $0 [--user|org] USER_OR_ORG_NAME GITEA_REPO_NAME GITLAB_HTTPS_URL"
exit 0
}
MODE=$1
GITEA_USERNAME=$2
GITEA_REPO_NAME=$3
GITLAB_CLONE_URL=$4
case $MODE in
--user|--org);;
*) _usage ;;
esac
[ -z "$GITLAB_CLONE_URL" ] && _usage
[ -z "$GITEA_REPO_NAME" ] && _usage
[ -z "$GITEA_USERNAME" ] && _usage
echo "Migrating $GITLAB_CLONE_URL to $GITEA_USERNAME/$GITEA_REPO_NAME"
GITEA_URL=${GITEA_URL:-"http://GITEA_URL"}
GITEA_TOKEN=${GITEA_TOKEN:-"YOUR_GITEA_TOKEN"}
GITLAB_USERNAME=${GITLAB_USERNAME:-"m"}
GITLAB_TOKEN=${GITLAB_TOKEN:-"YOUR_GITLAB_TOKEN"}
_api_call() {
# shellcheck disable=SC2086
curl -s -L -H "Authorization: token $GITEA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
"$GITEA_URL/api/v1/"$*
}
GITEA_UID=
[ "$MODE" = "--user" ] && GITEA_UID=$(_api_call "users/$GITEA_USERNAME" | jq .id)
[ "$MODE" = "--org" ] && GITEA_UID=$(_api_call "orgs/$GITEA_USERNAME" | jq .id)
echo "$GITEA_USERNAME has the user id $GITEA_UID"
migration_data=$(jq -n -c \
--arg name "$GITEA_REPO_NAME" \
--arg uid "$GITEA_UID" \
--arg clone_url "$GITLAB_CLONE_URL" \
--arg auth_username "$GITLAB_USERNAME" \
--arg auth_password "$GITLAB_TOKEN" \
'{
repo_name: $name,
clone_addr: $clone_url,
auth_username: $auth_username,
auth_password: $auth_password,
uid: $uid | tonumber,
private: true,
}'
)
_api_call repos/migrate --data "$migration_data" | jq .

37
bin/update-gitea.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
#
# usage, run with sudo:
# ./update-gitea.sh 1.6.1
#
set -e
version=$1
arch="linux-amd64"
giteaBinary="/home/git/gitea/gitea"
giteaStore="/home/git/gitea-update"
giteaUser="git"
giteaGroup="git"
# stop Gitea
sudo service gitea stop
echo "Stopped Gitea."
# download new binary
cd $giteaStore
echo "Downloading gitea-${version}-${arch}..."
wget -O "gitea-${version}-${arch}" "https://dl.gitea.io/gitea/${version}/gitea-${version}-${arch}"
# copy new binary over old one
sudo cp "gitea-${version}-${arch}" $giteaBinary
echo "Updated Gitea binary v${version}."
# set permissions
sudo chown $giteaUser:$giteaGroup $giteaBinary
sudo chmod +x $giteaBinary
echo "Set permissions."
# start Gitea
sudo service gitea start
echo "Restarted Gitea. Update done."

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,6 @@
<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" >
<g id="logo">
<rect id="Rectangle" fill="#C0CED3" fill-rule="nonzero" x="0" y="0" width="256" height="256" rx="28"></rect>
<path d="M148.57,172.766 C144.16,183.925 134.795,190.364 119.016,197.617 C114.515,199.476 110.096,201.662 105.543,203.905 L103.746,143.726 L107.339,143.726 L107.339,132.947 L102.848,132.947 L102.848,128.456 C113.324,126.081 121.026,116.914 120.812,106.002 C121.026,95.1677 114.378,86.2793 104.644,82.6486 L104.644,61.0919 L101.052,60.1938 L101.052,54.8046 L99.2553,53.0082 L98.3571,8.09851 L96.5607,8.09851 L94.7643,8.09851 L93.8661,53.0082 L92.0697,54.8046 L92.0697,60.1938 L88.477,61.0919 L88.477,82.6486 C78.9568,86.2722 72.3095,95.1641 72.3095,106.002 C72.3095,116.91 80.0117,126.077 90.2734,128.456 L90.2734,132.947 L85.7824,132.947 L85.7824,143.726 L89.3752,143.726 L83.986,256 L109.135,256 L106.441,227.258 C109.965,223.185 117.096,219.743 127.099,215.581 C146.18,206.543 162.356,193.991 167.494,163.628 L170.213,163.628 L170.213,152.85 L165.722,152.85 L165.722,148.359 C176.197,145.983 183.899,136.816 183.686,125.904 C183.899,115.07 177.252,106.182 167.518,102.551 L167.518,80.9943 L163.925,80.0961 L163.925,74.7069 L162.129,72.9106 L161.231,28.0009 L159.434,28.0009 L157.638,28.0009 L156.74,72.9106 L154.943,74.7069 L154.943,80.0961 L151.351,80.9943 L151.351,102.551 C141.83,106.175 135.183,115.066 135.183,125.904 C135.183,136.812 142.885,145.979 153.147,148.359 L153.147,152.85 L148.656,152.85 L148.656,163.628 L151.318,163.628 C150.542,167.012 149.651,170.031 148.57,172.766 Z" id="Path" fill="#BA5B81"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,37 @@
<style>
:root {
--color-primary: #ba5b81;
--color-primary-light-1: #d76995;
--color-primary-light-2: #ef8cb4;
--color-primary-light-3: #f4a1c2;
--color-primary-light-4: #f8c5da;
--color-primary-light-5: #fcdbe9;
--color-primary-light-6: #fdecf3;
--color-primary-light-7: #fff5f9;
--color-primary-dark-1: #ad4b72;
--color-primary-dark-2: #a03c64;
--color-primary-dark-3: #8f2b53;
--color-primary-dark-4: #7b1d43;
--color-primary-dark-5: #6d1236;
--color-primary-dark-6: #510825;
--color-primary-dark-7: #2b0212;
--color-primary-hover: var(--color-primary-light-2);
--fonts-proportional: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica,
Arial, sans-serif;
}
#navbar .item {
font-weight: 500;
}
.page-content .ui.ui.ui.container:not(.fluid) {
width: 1024px;
}
</style>
<script
async
defer
data-website-id="97bd228d-da39-4661-bd87-60f5047a5132"
src="https://a.kretschmann.io/script.js"
></script>

227
custom/templates/home.tmpl Normal file
View File

@ -0,0 +1,227 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>git.berlin</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Public Gitea installation housing git repositories for projects made in Berlin, Germany"
/>
<link rel="canonical" href="https://git.berlin" />
<link rel="icon" href="/assets/img/favicon.svg" type="image/svg+xml" />
<link
rel="alternate icon"
href="/assets/img/favicon.png"
type="image/png"
/>
<meta property="og:image" content="/assets/img/logo.png" />
<style>
*,
*:before,
*:after {
box-sizing: border-box;
}
html,
body {
min-height: 100vh;
height: 100%;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
}
body {
font-size: 1rem;
font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica,
Arial, sans-serif;
font-weight: 400;
line-height: 1.5;
color: #6b7f88;
padding: 2rem 0;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
@media (min-width: 45em) {
html {
font-size: 18px;
}
}
a {
color: #ba5b81;
text-decoration: none;
transition: 0.2s ease-out;
}
a:hover,
a:focus {
outline: 0;
color: #d76995;
}
.container {
max-width: 38em;
padding-left: 2rem;
padding-right: 2rem;
margin: auto;
}
article {
width: 100%;
height: 100%;
}
h1 {
font-size: 2.8rem;
font-weight: 400;
line-height: 1.2;
margin-top: 0;
margin-bottom: 2rem;
}
p {
margin: 0 0 1rem;
}
p:last-of-type {
margin-bottom: 0;
}
.btn {
padding: 0.3rem 1rem;
display: inline-block;
text-transform: uppercase;
font-size: 0.8rem;
border: 1px solid #8aa4af;
border-radius: 0.2rem;
margin-top: 1rem;
margin-bottom: 1rem;
}
.btn:hover,
.btn:focus {
background: #fff;
color: #ba5b81;
border-color: #fff;
}
.btn--primary {
background: #ba5b81;
color: #fff;
border-color: #ba5b81;
}
.btn--primary:hover,
.btn--primary:focus {
background: #fff;
color: #ba5b81;
border-color: #fff;
}
#logo-gitberlin {
height: 7em;
margin: 0 auto 1rem auto;
display: block;
}
.login {
padding: 2rem 0;
margin-top: 2rem;
color: #fff;
background: #c0ced3;
}
.text-center {
text-align: center;
}
footer {
padding-top: 2rem;
padding-bottom: 2rem;
font-size: 0.8rem;
color: #96a6ad;
}
</style>
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@kremalicious" />
<meta name="twitter:url" content="https://git.berlin" />
<meta name="twitter:title" content="git.berlin" />
<meta
name="twitter:description"
content="Public Gitea installation housing git repositories for projects made in Berlin, Germany"
/>
</head>
<body>
<article>
<div class="container">
<svg
id="logo-gitberlin"
viewBox="0 0 115 256"
xmlns="http://www.w3.org/2000/svg"
>
<g fill="#C0CED3">
<path
d="M78.0192954,168.596418 C73.6220556,179.722758 64.2844708,186.142587 48.5518727,193.374879 C44.0643811,195.228368 39.6589412,197.407435 35.1186783,199.643703 L33.3275857,139.642102 L36.9097709,139.642102 L36.9097709,128.895546 L32.4320394,128.895546 L32.4320394,124.417815 C42.8765972,122.048958 50.556092,112.908921 50.3429652,102.029158 C50.556092,91.2271563 43.9283386,82.3649534 34.223132,78.744954 L34.223132,57.251843 L30.6409468,56.3562967 L30.6409468,50.983019 L28.8498543,49.1919264 L27.954308,4.41461182 L26.1632154,4.41461182 L24.3721228,4.41461182 L23.4765765,49.1919264 L21.6854839,50.983019 L21.6854839,56.3562967 L18.1032988,57.251843 L18.1032988,78.744954 C8.61121895,82.3578294 1.98346553,91.2235944 1.98346553,102.029158 C1.98346553,112.905359 9.66296035,122.045396 19.8943913,124.417815 L19.8943913,128.895546 L15.4166599,128.895546 L15.4166599,139.642102 L18.9988451,139.642102 L13.6255673,251.585388 L38.7008635,251.585388 L36.0142246,222.927907 C39.5275371,218.866822 46.6381547,215.435089 56.6117893,211.285805 C75.6361855,202.274343 91.7641216,189.758951 96.8874971,159.485798 L99.5980113,159.485798 L99.5980113,148.739243 L95.1202798,148.739243 L95.1202798,144.261511 C105.564838,141.892655 113.244332,132.752617 113.031206,121.872854 C113.244332,111.070853 106.616579,102.20865 96.9113724,98.5886506 L96.9113724,77.0955396 L93.3291872,76.1999933 L93.3291872,70.8267156 L91.5380946,69.035623 L90.6425484,24.2583084 L88.8514558,24.2583084 L87.0603632,24.2583084 L86.1648169,69.035623 L84.3737243,70.8267156 L84.3737243,76.1999933 L80.7915391,77.0955396 L80.7915391,98.5886506 C71.2994593,102.201526 64.6717059,111.067291 64.6717059,121.872854 C64.6717059,132.749055 72.3512007,141.889093 82.5826317,144.261511 L82.5826317,148.739243 L78.1049003,148.739243 L78.1049003,159.485798 L80.7591713,159.485798 C79.9856238,162.859581 79.0970526,165.869367 78.0192954,168.596418 Z"
></path>
</g>
</svg>
<h1 class="text-center">git.berlin</h1>
<p>
Public <a href="https://gitea.io">Gitea</a> installation
housing git repositories for projects made in Berlin,
Germany. You know you always wanted
<code>git.berlin</code> in your remotes.
</p>
<p>
Sign up is open for everyone creating open source or
personal projects. Gitea is set up to private by default for
all new repositories and groups. You're encouraged to make
your repositories public though.
</p>
</div>
<div class="login text-center">
<div class="container">
<p>
<a
class="btn btn--primary"
href="https://git.berlin/user/login"
>Sign In or Sign Up</a
>
<a class="btn" href="https://git.berlin/explore/repos"
>Explore public repositories</a
>
</p>
</div>
</div>
<footer class="text-center">
<p>
Maintained by
<a href="https://matthiaskretschmann.com">@kremalicious</a>.
<br /><a href="mailto:m@git.berlin">Questions?</a>
</p>
</footer>
</article>
<script
async
defer
data-website-id="97bd228d-da39-4661-bd87-60f5047a5132"
src="https://a.kretschmann.io/script.js"
></script>
</body>
</html>

View File

@ -1,12 +0,0 @@
# Default
| Default location | Permissions | Ownership | Purpose |
| ---------------- | ----------- | --------- | ------- |
| `/var/opt/gitlab/git-data` | 0700 | git:root | Holds repositories directory |
| `/var/opt/gitlab/git-data/repositories` | 2770 | git:git | Holds git repositories |
| `/var/opt/gitlab/gitlab-rails/shared` | 0751 | git:gitlab-www | Holds large object directories |
| `/var/opt/gitlab/gitlab-rails/shared/artifacts` | 0700 | git:root | Holds CI artifacts |
| `/var/opt/gitlab/gitlab-rails/shared/lfs` | 0700 | git:root | Holds LFS objects |
| `/var/opt/gitlab/gitlab-rails/uploads` | 0700 | git:root | Holds user attachments |
| `/var/opt/gitlab/gitlab-pages` | 0750 | git:gitlab-www | Holds user pages |
| `/var/opt/gitlab/gitlab-ci/builds` | 0700 | git:root | Holds CI build logs |

View File

@ -1,21 +1,14 @@
'use strict'
var gulp = require('gulp'),
gs = require('gulp-gcloud-publish'),
browser = require('browser-sync')
const gulp = require('gulp')
const rsync = require('gulp-rsync')
const browser = require('browser-sync').create()
// paths
var DIST = './public/'
// deployment
var BUCKET = 'hello.git.berlin',
PROJECTID = 'git-berlin'
const DIST = './custom/'
//
// Dev Server
//
gulp.task('server', function() {
gulp.task('server', () => {
browser.init({
server: DIST,
port: 1337,
@ -23,19 +16,19 @@ gulp.task('server', function() {
})
})
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Deployment
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gulp.task('deploy', function() {
return gulp.src(DIST + '**/*')
.pipe(gs({
bucket: BUCKET,
keyFilename: 'key.json',
projectId: PROJECTID,
base: '/',
public: true
}))
})
gulp.task('deploy', () =>
gulp.src(DIST + '**/*').pipe(
rsync({
root: DIST,
hostname: 'git',
destination: 'gitea/custom',
chown: 'git:git',
delete: true,
exclude: ['conf/']
})
)
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

10348
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,20 +5,24 @@
"name": "Matthias Kretschmann",
"email": "m@kretschmann.io"
},
"homepage": "https://www.git.berlin",
"homepage": "https://git.berlin",
"main": "gulpfile.js",
"scripts": {
"start": "gulp",
"deploy": "gulp deploy"
},
"devDependencies": {
"browser-sync": "^2.17.3",
"gulp": "^3.9.1",
"gulp-awspublish": ">=3.0.0",
"gulp-gcloud-publish": "^1.2.1"
"browser-sync": "^3.0.2",
"gulp": "^4.0.2",
"gulp-rsync": "0.1.0",
"gulp-util": "^3.0.8"
},
"engines": {
"node": ">=0.10.29"
"node": "16"
},
"private": true,
"repository": {
"type": "git",
"url": "https://www.git.berlin/kremalicious/git.berlin.git"
"url": "https://git.berlin/m/git.berlin.git"
}
}

View File

@ -1,211 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>git.berlin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Public GitLab CE installation housing git repositories for projects made in Berlin, Germany">
<link rel="canonical" href="https://git.berlin">
<style>
*,
*:before,
*:after {
box-sizing: border-box;
}
html,
body {
min-height: 100vh;
height: 100%;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
}
body {
font-size: 1rem;
font-family: 'Avenir Next', Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 400;
line-height: 1.5;
color: #6b7f88;
padding: 2rem 0;
-moz-display: flex;
-moz-align-items: center;
-moz-justify-content: center;
-moz-flex-wrap: wrap;
-webkit-display: flex;
-webkit-align-items: center;
-webkit-justify-content: center;
-webkit-flex-wrap: wrap;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
@media (min-width: 45em) {
html {
font-size: 18px;
}
}
a {
color: #BA5B81;
text-decoration: none;
transition: .2s ease-out;
}
a:hover,
a:focus {
outline: 0;
color: #d76995;
}
.container {
max-width: 38em;
padding-left: 2rem;
padding-right: 2rem;
margin: auto;
}
article {
width: 100%;
height: 100%;
}
h1 {
font-size: 2.8rem;
font-weight: 400;
line-height: 1.2;
margin-top: 0;
margin-bottom: 2rem;
}
p {
margin: 0 0 1rem;
}
p:last-of-type {
margin-bottom: 0;
}
.btn {
padding: .3rem 1rem;
display: inline-block;
text-transform: uppercase;
font-size: .8rem;
border: 1px solid #8aa4af;
border-radius: .2rem;
margin-top: 1rem;
margin-bottom: 1rem;
}
.btn:hover,
.btn:focus {
background: #fff;
color: #BA5B81;
border-color: #fff;
}
.btn--primary {
background: #BA5B81;
color: #fff;
border-color: #BA5B81;
}
.btn--primary:hover,
.btn--primary:focus {
background: #fff;
color: #BA5B81;
border-color: #fff;
}
#logo-gitberlin {
height: 7em;
margin: 0 auto 1rem auto;
display: block;
}
.login {
padding: 2rem 0;
margin-top: 2rem;
color: #fff;
background: #C0CED3;
}
.text-center {
text-align: center;
}
footer {
padding-top: 2rem;
padding-bottom: 2rem;
font-size: .8rem;
color: #96a6ad;
}
</style>
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@kremalicious">
<meta name="twitter:url" content="https://git.berlin">
<meta name="twitter:title" content="git.berlin">
<meta name="twitter:description" content="Public GitLab CE installation housing git repositories for projects made in Berlin, Germany">
</head>
<body>
<article>
<div class="container">
<svg id="logo-gitberlin" viewBox="0 0 115 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="#C0CED3" fill="none" stroke-width="4">
<path d="M78.0192954,168.596418 C73.6220556,179.722758 64.2844708,186.142587 48.5518727,193.374879 C44.0643811,195.228368 39.6589412,197.407435 35.1186783,199.643703 L33.3275857,139.642102 L36.9097709,139.642102 L36.9097709,128.895546 L32.4320394,128.895546 L32.4320394,124.417815 C42.8765972,122.048958 50.556092,112.908921 50.3429652,102.029158 C50.556092,91.2271563 43.9283386,82.3649534 34.223132,78.744954 L34.223132,57.251843 L30.6409468,56.3562967 L30.6409468,50.983019 L28.8498543,49.1919264 L27.954308,4.41461182 L26.1632154,4.41461182 L24.3721228,4.41461182 L23.4765765,49.1919264 L21.6854839,50.983019 L21.6854839,56.3562967 L18.1032988,57.251843 L18.1032988,78.744954 C8.61121895,82.3578294 1.98346553,91.2235944 1.98346553,102.029158 C1.98346553,112.905359 9.66296035,122.045396 19.8943913,124.417815 L19.8943913,128.895546 L15.4166599,128.895546 L15.4166599,139.642102 L18.9988451,139.642102 L13.6255673,251.585388 L38.7008635,251.585388 L36.0142246,222.927907 C39.5275371,218.866822 46.6381547,215.435089 56.6117893,211.285805 C75.6361855,202.274343 91.7641216,189.758951 96.8874971,159.485798 L99.5980113,159.485798 L99.5980113,148.739243 L95.1202798,148.739243 L95.1202798,144.261511 C105.564838,141.892655 113.244332,132.752617 113.031206,121.872854 C113.244332,111.070853 106.616579,102.20865 96.9113724,98.5886506 L96.9113724,77.0955396 L93.3291872,76.1999933 L93.3291872,70.8267156 L91.5380946,69.035623 L90.6425484,24.2583084 L88.8514558,24.2583084 L87.0603632,24.2583084 L86.1648169,69.035623 L84.3737243,70.8267156 L84.3737243,76.1999933 L80.7915391,77.0955396 L80.7915391,98.5886506 C71.2994593,102.201526 64.6717059,111.067291 64.6717059,121.872854 C64.6717059,132.749055 72.3512007,141.889093 82.5826317,144.261511 L82.5826317,148.739243 L78.1049003,148.739243 L78.1049003,159.485798 L80.7591713,159.485798 C79.9856238,162.859581 79.0970526,165.869367 78.0192954,168.596418 Z"></path>
</g>
</svg>
<h1 class="text-center">git.berlin</h1>
<p>Public <a href="https://about.gitlab.com/features/">GitLab CE</a> installation housing git repositories for projects made in Berlin, Germany. You know you always wanted <code>git.berlin</code> in your remotes.</p>
<p>Sign up is open for everyone creating open source or personal projects. GitLab is set up to private by default for all new repositories and groups. You're encouraged to make your repositories public though.</p>
</div>
<div class="login text-center">
<div class="container">
<p>
<a class="btn btn--primary" href="https://git.berlin/users/sign_in">Sign In or Sign Up</a>
<a class="btn" href="https://git.berlin/explore/projects">Explore public repositories</a>
</p>
</div>
</div>
<footer class="text-center">
<p>Maintained by <a href="https://matthiaskretschmann.com">@kremalicious</a>. <br><a href="mailto:m@git.berlin">Questions?</a></p>
</footer>
</article>
<!-- Piwik -->
<script>
var _paq = _paq || [];
_paq.push(["setDomains", ["*.git.berlin"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.kremalicious.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 3]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript>
<p><img src="//analytics.kremalicious.com/piwik.php?idsite=3" style="border:0;" alt="" /></p>
</noscript>
<!-- End Piwik Code -->
</body>
</html>