forked from DGNum/infrastructure
fix(storage01): Fix garage and peertube config
This commit is contained in:
parent
3785088616
commit
de5fe11f84
2 changed files with 19 additions and 5 deletions
|
@ -6,6 +6,9 @@ let
|
||||||
|
|
||||||
data_dir = "/data/slow/garage/data";
|
data_dir = "/data/slow/garage/data";
|
||||||
metadata_dir = "/data/fast/garage/meta";
|
metadata_dir = "/data/fast/garage/meta";
|
||||||
|
|
||||||
|
buckets = [ "peertube-videos-dgnum" ];
|
||||||
|
|
||||||
in {
|
in {
|
||||||
services.garage = {
|
services.garage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -31,9 +34,9 @@ in {
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
};
|
};
|
||||||
|
|
||||||
k2v_api.api_bind_addr = "[::]:3904";
|
k2v_api.api_bind_addr = "[::]:3904";
|
||||||
|
|
||||||
admin.api_bind_addr = "0.0.0.0:3903";
|
admin.api_bind_addr = "0.0.0.0:3903";
|
||||||
};
|
};
|
||||||
|
|
||||||
environmentFile = config.age.secrets."garage-environment_file".path;
|
environmentFile = config.age.secrets."garage-environment_file".path;
|
||||||
|
@ -54,18 +57,25 @@ in {
|
||||||
${host} = {
|
${host} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
|
serverAliases = builtins.map (b: "${b}.${host}") buckets;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
proxy_pass http://127.0.0.1:3900;
|
proxy_pass http://127.0.0.1:3900;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
# Disable buffering to a temporary file.
|
# Disable buffering to a temporary file.
|
||||||
proxy_max_temp_file_size 0;
|
proxy_max_temp_file_size 0;
|
||||||
|
client_max_body_size 200M;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
${webHost} = {
|
${webHost} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
|
serverAliases = builtins.map (b: "${b}.${webHost}") buckets;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
proxy_pass http://127.0.0.1:3902;
|
proxy_pass http://127.0.0.1:3902;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -9,17 +9,21 @@ in {
|
||||||
object_storage = {
|
object_storage = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
||||||
endpoint = "s3.dgnum.eu";
|
endpoint = "https://s3.dgnum.eu";
|
||||||
region = "garage";
|
region = "garage";
|
||||||
|
|
||||||
|
max_upload_part = "150MB";
|
||||||
|
|
||||||
videos = {
|
videos = {
|
||||||
bucket_name = "peertube-videos-dgnum";
|
bucket_name = "peertube-videos-dgnum";
|
||||||
prefix = "web-videos";
|
prefix = "web-videos/";
|
||||||
|
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
|
||||||
};
|
};
|
||||||
|
|
||||||
streaming_playlists = {
|
streaming_playlists = {
|
||||||
bucket_name = "peertube-videos-dgnum";
|
bucket_name = "peertube-videos-dgnum";
|
||||||
prefix = "streaming-playlists";
|
prefix = "streaming-playlists/";
|
||||||
|
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue