elnudrop: host tatoeba API

This commit is contained in:
Elnu 2023-08-12 12:04:37 -07:00
parent 4bbd00cc9f
commit c393cbb98f
5 changed files with 123 additions and 15 deletions

View file

@ -39,4 +39,6 @@
};
services.do-agent.enable = true;
services.tatoeba.enable = true;
}

View file

@ -19,18 +19,18 @@ let host = "jichan.org"; in {
"/missing.min.css".root = "${../shared/502}";
# Formerly tatoeba.elnu.com
# https://git.elnu.com/ElnuDev/tatoeba-api
# https://git.elnu.com/jichan.org/apis
"/api/tatoeba/" = {
proxyPass = "http://elnuhub:3001";
proxyPass = "http://localhost:3001";
extraConfig = ''
rewrite ^/api/tatoeba/(.*) /$1 break;
'';
};
# Formerly images.elnu.com
# https://git.elnu.com/ElnuDev/image-api
# https://git.elnu.com/jichan.org/apis
"/api/images/" = {
proxyPass = "http://elnuhub:3002";
proxyPass = "http://localhost:3002";
extraConfig = ''
rewrite ^/api/images/(.*) /$1 break;
'';