~franz/f-a.nz

a09224575151cb92d598d2cab9fb4e70ba5ea0fe — Franz Geffke 1 year, 11 months ago f29a65f
added new post, updated resume
2 files changed, 109 insertions(+), 11 deletions(-)

A _dev/2018/install-gitea-behind-nginx-on-debian.md
M resume.md
A _dev/2018/install-gitea-behind-nginx-on-debian.md => _dev/2018/install-gitea-behind-nginx-on-debian.md +95 -0
@@ 0,0 1,95 @@
---
title: "Gitea behind nginx on Debian"
layout: post
date: 2018-12-12 00:00:00 +0200
category:
  - dev
tags:
  - gitea
  - debian
  - nginx
  - git
---

I don't really have time to write-up something detailed but this should get you, to where you want to be:

1. Gitea 1.6.1 running using supervisor on Debian 9.x
2. nginx reverse proxy
3. LetsEncrypt

## Instructions

```bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install git nginx certbot supervisor -y
sudo adduser --disabled-login --gecos 'gitea' git
wget -O gitea https://dl.gitea.io/gitea/1.6.1/gitea-1.6.1-linux-amd64
chmod +x gitea
mkdir -p custom/conf
mkdir data
exit
sudo mkdir /var/log/gitea
sudo nano /etc/supervisor/conf.d/gitea.conf
```

Add this to `gitea.conf`:

```
[program:gitea]
directory=/home/git/
command=/home/git/gitea web
autostart=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/gitea/stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/var/log/gitea/stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment = HOME="/home/git", USER="git"
```

```bash
sudo service supervisor restart
sudo systemctl stop nginx
sudo certbot certonly --standalone --email email@yourdomain.com -d git.yourdomain.com
sudo nano /etc/nginx/sites-available/git.yourdomain.com
```

Add this to `git.yourdomain.com`:

```
server{
		listen 80;
        server_name git.yourdomain.com;
        return 301 https://git.yourdomain.com$request_uri;
}

server{
        listen 443;
        ssl on;
        server_name git.yourdomain.com;
        ssl_certificate /etc/letsencrypt/live/git.yourdomain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/git.yourdomain.com/privkey.pem;
        location / {
                proxy_pass http://127.0.0.1:3000;
                proxy_set_header Host             $host;
                proxy_set_header X-Real-IP        $remote_addr;
                proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
                client_max_body_size 100M;
        }
}
```

Symlink the config, start nginx.

```bash
sudo ln -s /etc/nginx/sites-available/git.yourdomain.com /etc/nginx/sites-enabled/
sudo systemctl start nginx
```

That's it. Visit your site at git.yourdomain.com.
\ No newline at end of file

M resume.md => resume.md +14 -11
@@ 11,21 11,24 @@ sitemap:

For latest projects, kindly refer to my <a href="#independent-work">independent work</a>

### SEDVentures Middle East, <location>Tehran, Iran</location>
<date>Summer 2018</date>
<position>Co-Founder</position>

- Research market conditions, evaluate individual ventures based on preset factors
- Negotiate with suppliers on products and parts for individual ventures
- Establish supply-chain for export to Europe: source, ship, pack, distribution
- *Start-up fever: Everybody, everything.*
### Panther Computer, <location>Tehran, Iran</location>
<date>2018</date>
<position>Founder</position>
- Develop system architecture of PantherX OS
- Source, interview and hire highly qualified C,C++,Python developers to join the team
- Establish internal development workflow based around GitLab Ultimate
- Set development goals, manage individual milestones and keep developers on track
- Set-up and maintain required infrastructure

### SEDVentures Europe, <location>Dublin, Ireland</location>
<date>Summer 2018</date>
### SEDVentures Middle East, <location>Tehran, Iran</location>
<date>2018</date>
<position>Co-Founder, Director</position>
- Negotiate investor funding
- Establish internal processes for all common operations such as hiring, reporting
- Source, and interview candidates for marketing, development and sales
- Research market conditions, evaluate individual ventures based on preset factors
- Negotiate with suppliers on products and parts for individual ventures
- Establish supply-chain for export to Europe: source, ship, pack, distribution
- Oversee development of PantherX OS and Panther Alpha

### Sky-Hype AG, <location>Schifflange, Luxembourg</location>
<date>2016-2018</date>