blob: 56a0960f9a1a37feaaf7b3dd7dfedc2e438509d9 [file] [log] [blame]
Nico Huberd6528722023-07-01 14:38:39 +00001Create environment files (cf. `git ls-files \*environment.template`):
2* Set SA_PUBLIC_DOMAIN_NAME in `environment`
Nico Hubera1a296f2023-06-25 10:07:07 +00003* Set CANONICAL_WEB_URL in `gerrit/environment`
Nico Huber54073102023-06-25 11:36:59 +00004* Enable GitHub OAUTH in `gerrit/environment`
Nico Huber59c365c2023-07-01 18:18:12 +00005
Nico Huberf3c71252023-07-21 13:03:49 +00006Building using self-signed certificates:
7We always create a temporary, self-signed certificate which
8can be overwritten by certbot. If intending to test with the
9self-signed certificate, build nginx first:
10* `docker-compose build nginx`,
11then everything else:
12* `docker-compose build --build-arg SSL_VARIANT=selfsigned`
13which will register the self-signed certificate with Gerrit.
Nico Huberaa15aee2023-07-01 22:35:45 +000014
Nico Huber59c365c2023-07-01 18:18:12 +000015Get containers up:
16* `docker-compose up`
Nico Huber15edd772023-07-01 18:16:50 +000017
Nico Huber804b41b2023-07-02 15:53:42 +000018Mail setup:
19* A 'gerrit@' mail account will be added automatically
20* See `docker-compose exec mailserver setup` for more
21* Add account or alias for 'postmaster@'
22
Nico Huber15edd772023-07-01 18:16:50 +000023When the containers are up run `certbot`:
Nico Huberc5ab17f2023-07-21 22:30:59 +000024* Make sure to set SA_DOMAIN_CONTACT in `environment`
Nico Huber15edd772023-07-01 18:16:50 +000025* Once `docker-compose -f sa-certbot.yml run new`
26* Every x < 30 days `docker-compose -f sa-certbot.yml run renew`
27* Always reload nginx `docker-compose exec nginx nginx -s reload`
Nico Huber22aecea2023-07-19 01:39:58 +000028
29DKIM:
30* `docker-compose exec mailserver setup config dkim`
31* If using a subdomain, set `use_esld = false;`
32 in `mail/rspamd-override.d/dkim_signing.conf`
33* Publish key from `mail/config/rspamd/dkim/*.public.dns.txt` via DNS
Nico Hubered486d52023-07-19 14:00:59 +000034
35Mail testing with dial-in IP:
36Some popular (german) email providers greet with a 554 error when the IP is
37blacklisted. Seems out of standard and hence can lead to not bouncing the
38message immediately.
39* Set `smtp_skip_5xx_greeting = no` in `mail/config/postfix-main.cf`,
40 if you want immediate bounces.
Nico Huber5132ca72023-07-20 23:40:48 +000041
42Import projects into Gerrit:
43* `sudo git -C gerrit/git/ clone --mirror ...`
44 - Update `groups` and groups in `project.config`
45 in branch `refs/meta/config`
46* Import foreign server IDs if needed, e.g.
47 `sudo git config -f gerrit/etc/gerrit.config --add gerrit.importedServerId fb9ff590-4b50-4f01-be71-0aafd704c4b4`
48* Import foreign account IDs:
49 - Check out refs/meta/external-ids` of `All-Users.git`
50 - `sha1sum` the imported ID, e.g. `echo -n imported:1000000@fb9ff590-4b50-4f01-be71-0aafd704c4b4 | sha1sum`
51 - Use SHA1 sum as filename, contents:
52 [externalId "imported:1000000@fb9ff590-4b50-4f01-be71-0aafd704c4b4"]
53 accountId = 1000123
54 - import_account_id() {
55 imported=imported:$1
56 sha1=$(printf "%s" ${imported} | sha1sum | awk '{ printf $1; }')
57 local=$2
58 printf "[externalId \"${imported}\"]\n\taccountId = ${local}\n" >${sha1}
59 }
60 - Commit & push
61* Restart containers