From e430051e2415bd53a7ead6187805ae62b9d8b5c6 Mon Sep 17 00:00:00 2001 From: syui Date: Mon, 9 Jan 2023 14:54:13 +0900 Subject: [PATCH] first --- .gitignore | 1 + Dockerfile | 6 ++++ config.yaml.example | 5 +++ fly.toml | 40 ++++++++++++++++++++++ readme.md | 82 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 config.yaml.example create mode 100644 fly.toml create mode 100644 readme.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6b072 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cb01b4a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM superseriousbusiness/gotosocial + +WORKDIR /gotosocial +ADD config.yaml /gotosocial/ + +CMD ["--config-path", "/gotosocial/config.yaml"] diff --git a/config.yaml.example b/config.yaml.example new file mode 100644 index 0000000..da75bb0 --- /dev/null +++ b/config.yaml.example @@ -0,0 +1,5 @@ +host: "" +account-domain: "" +db-type: "sqlite" +db-address: "/data/xxx/sqlite.db" +accounts-registration-open: false diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..8683d11 --- /dev/null +++ b/fly.toml @@ -0,0 +1,40 @@ +app = "xxx" +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[env] + +[experimental] + allowed_public_ports = [] + auto_rollback = true + +[[services]] + http_checks = [] + internal_port = 8080 + processes = ["app"] + protocol = "tcp" + script_checks = [] + [services.concurrency] + hard_limit = 25 + soft_limit = 20 + type = "connections" + + [[services.ports]] + force_https = true + handlers = ["http"] + port = 80 + + [[services.ports]] + handlers = ["tls", "http"] + port = 443 + + [[services.tcp_checks]] + grace_period = "1s" + interval = "15s" + restart_limit = 0 + timeout = "2s" + +[mounts] +source="xxx_data" +destination="/data/xxx" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..5f699c2 --- /dev/null +++ b/readme.md @@ -0,0 +1,82 @@ +### fly.io + +> Dockerfile + +``` +FROM superseriousbusiness/gotosocial + +WORKDIR /gotosocial +ADD config.yaml /gotosocial/ + +CMD ["--config-path", "/gotosocial/config.yaml"] +``` + +```sh +$ app=xxx +$ fly launch --name $app +$ fly vol create ${app}_data --size 1 -a $app +``` + +### config + +> config.yaml + +``` +host: "$app.fly.dev" +db-type: "sqlite" +db-address: "/data/goto/sqlite.db" +accounts-registration-open: false +``` + +> fly.toml + +``` +[mounts] +source="$app_data" +destination="/data/goto" +``` + +### deploy + +```sh +$ fly deploy +``` + +### create user + +```sh +$ fly ssh consosh consolee +$ /gotosocial/gotosocial --config-path /gotosocial/config.yaml admin account create --username $user --email $mail --password $pass +$ /gotosocial/gotosocial --config-path /gotosocial/config.yaml admin account confirm --username $user +$ /gotosocial/gotosocial --config-path /gotosocial/config.yaml admin account promote --username $user +``` + +### post + +gotosocial is no ui. + +setting : /user + +web client : https://pinafore.social + +### domain + +https://github.com/superseriousbusiness/gotosocial/blob/main/example/config.yaml + +https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md + +> https://example.com/.well-known/host-meta + +``` + + + + +``` + +> config.yaml + +``` +host: "$app.fly.dev" +account-domain: "example.com" +```