Andreas Linz
53f179d3c5
Restart Drone CI agent and server when changed
3 years ago
Andreas Linz
80221db59e
Fix DB configuration of gitea
3 years ago
Andreas Linz
5e63a98130
Merge branch 'droneci'
3 years ago
Andreas Linz
23c5c3d846
Remove accidentally commited vim swap file
3 years ago
Andreas Linz
a497977cc7
Setup service for Drone CI agent
The drone-server can't reach the agent if its `--server` flag is set to
the drone-server's address.
3 years ago
Andreas Linz
1723f81dd5
Make sure that dependencies for custom repositories are installed
3 years ago
Andreas Linz
b98abc77ff
Install a Docker CE from the official repository
Drone 0.8.1+ requires at least Docker API version > 1.26
3 years ago
Andreas Linz
ed3f71258e
Configure postgres in Drone CI
3 years ago
Andreas Linz
6686775434
Fix config gitea path
The `chdir` command was not executed reliably so I use the absolute path
to gitea's config file instead.
3 years ago
Andreas Linz
9ed71ac09b
Remove unused DRONE_SECRET
3 years ago
Andreas Linz
37d033e898
Remove unused template
3 years ago
Andreas Linz
e004a2717e
Set admin user for droneci
This was one of the reason I received "registration is disabled" error
when trying to start Drone CI.
3 years ago
Andreas Linz
aca51f0b20
Run droneci before caddy role
3 years ago
Andreas Linz
b6b68dff12
Add drone user to docker group
3 years ago
Andreas Linz
cc8e3fb0f3
Update gitea to 1.2.1
This fixes some authentication issues with Drone CI.
3 years ago
Andreas Linz
16f1a7b97a
Setup build script for Drone CI
3 years ago
Andreas Linz
f63dc85b71
Fix config gitea path
The `chdir` command was not executed reliably so I use the absolute path
to gitea's config file instead.
3 years ago
Andreas Linz
fe2d3563b7
Redirect self-hosted rustdocs to docs.rs
3 years ago
Andreas Linz
e4af849a82
Restart gitea if build changed
3 years ago
Andreas Linz
b9e6794fd5
Update gitea to 1.2.0
This adds signed commit support and provides a new UI.
3 years ago
Andreas Linz
753da18852
Add and install goaccess
3 years ago
Andreas Linz
1e947c4918
Only log errors on restic subdomain
3 years ago
Andreas Linz
447367c24e
Set git version in common role
Previously, the git status was set after all roles were applied, i.e.
the value was still "unknown"
3 years ago
Andreas Linz
7f32b8e53b
Remove reverting of caddy's sponsor header
The header was removed in the latest release anyways.
3 years ago
Andreas Linz
a77ad4692e
Update to caddy 0.10.10
3 years ago
Andreas Linz
b58977be95
Cache images and set max-age to about a month
3 years ago
Andreas Linz
561d706781
Set Cache-Control header for /js and /css on [www.]klingt.net
3 years ago
Andreas Linz
2d0dc61415
Fix cache age
See https://golang.org/pkg/time/#ParseDuration for valid duration
values.
3 years ago
Andreas Linz
198b9d6b2c
Add cache directive to [www.]klingt.net
3 years ago
Andreas Linz
6ad46e4853
Add gzip directive
3 years ago
Andreas Linz
9e264c84ed
Remove upload directive because it breaks `caddy -validate` call
```sh
$ caddy -conf=/etc/caddy/Caddyfile -validate
2017/10/08 12:43:37 /etc/caddy/Caddyfile:92 - Error during parsing: You are using plugin 'upload' on a site without TLS.
```
TLS is not disabled for this site.
Unfortunately, I can't open an issue for the plugin because it resides
on a self-hosted gitlab instance where account creating is disabled.
If @wmark reads this, please check if you can fix the problem with
`caddy -validate`.
3 years ago
Andreas Linz
36b70dea8c
Remove basic auth from files.klingt.net
3 years ago
Andreas Linz
dd498b192c
Add important option
This backup option omits jupyter.
3 years ago
Andreas Linz
612d6880a8
Be more verbose
3 years ago
Andreas Linz
9d9d06904a
Do not backup restic and files.klingt.net in caddy backup step
This would take way too long and therefore cause a downtime which can be
prevented by backing those folders up in a separate target that does not
stop caddy.
3 years ago
Andreas Linz
e777f79067
Use live domain
3 years ago
Andreas Linz
c4b66c0d11
Do not use staging CA for live
Pro tip: If you own more than 5 subdomains than keep a backup of your
already issued certificates because you can issue up two 20 a week but
only renew 5!
Let's run the service with staging certificates for a week :|
3 years ago
Andreas Linz
1cff9bce85
Serve klingt.net backup
3 years ago
Andreas Linz
0512b6f1ae
Sign certificates with custom root CA
This simplifies the development because only the root CA has to be
trusted in the browser.
3 years ago
Andreas Linz
79c1eff5cf
Install vim on the remote machine
3 years ago
Andreas Linz
cbd45ba35c
Set landing page to /explore
3 years ago
Andreas Linz
32f6f57a71
Fix SSH clone link
3 years ago
Andreas Linz
b20483c0c3
Move prometheus directive to the top
From https://caddyserver.com/docs/http.prometheus
You'll need to put this module early in the chain,
so that the duration histogram actually makes sense. I've put it at number 0.
3 years ago
Andreas Linz
988bf402d1
Add a script to generate a valid self-signed certificate
This is based on this gist: https://gist.github.com/jdeathe/4c08460eb0bac99da32748bcbda39333
Unfortunately, since FF 48 and Chrome 58 it is required to set a
SubjectAltName (SAN) in the certificate because the CommonName (CN)
support was removed.
There is also this https://alexanderzeitler.com/articles/Fixing-Chrome-missing_subjectAltName-selfsigned-cert-openssl/
article which uses a custom root CA. Maybe I give this a try.
Nonetheless, I can't thank letsencrypt enough because actually they made
it easier to get a valid certificate then to generate a self-signed
one.
3 years ago
Andreas Linz
b7116be7f0
Provide a self-signed wildcard certificate
This is useful because the certificate is static (tls self-signed
generates one on each start) you only have to confirm the security
exception once.
3 years ago
Andreas Linz
3aba1bb89b
Update passwords
3 years ago
Andreas Linz
64e1963e3b
Merge backup and restore scripts
3 years ago
Andreas Linz
24fe02de8a
Fix index page suffix
3 years ago
Andreas Linz
9e78af9ba2
Change email address
3 years ago
Andreas Linz
c242b4c4c9
Only use self_signed TLS certificates in staging enviroment
The newlines before the `{% endif %}`s are required because jinja
trims the newlines from the end of a block.
3 years ago