Deploy do GoToSocial no fly.io
Subindo uma instância do GoToSocial no fly.io
Criando o banco de dados🔗
fly postgres create \
--autostart \
--region gru \
--name antisocial-db \
--password de5f88d72496591f21c8803be391f5c8cab26e4fc338a3370cec3db024edcd1b
Setup selecionado:
? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
? Scale single node pg to zero after one hour? Yes
Criando a estrutura🔗
1) Entrando no container
2) Criando o banco de dados (é preciso da senha do banco)
psql \
-U postgres \
-h antisocial-db.flycast \
-c "create database gotosocial with locale 'C.UTF-8' template template0;"
Iniciando a aplicativo🔗
fly launch \
--name antisocial \
--image superseriousbusiness/gotosocial:0.16.0 \
--region gru \
--vm-memory 512MB \
--vm-size shared-cpu-1x \
--no-deploy \
--yes
Definindo as variáveis no ambiente🔗
fly secrets set --app antisocial \
GTS_HOST="antisocial.fly.dev" \
GTS_DB_TYPE=postgres \
GTS_DB_ADDRESS="antisocial-db.flycast" \
GTS_DB_USER="postgres" \
GTS_DB_PORT="5432" \
GTS_DB_PASSWORD="de5f88d72496591f21c8803be391f5c8cab26e4fc338a3370cec3db024edcd1b" \
GTS_DB_DATABASE="gotosocial" \
GTS_LETSENCRYPT_ENABLED="false" \
GTS_LETSENCRYPT_EMAIL_ADDRESS="" \
GTS_INSTANCE_INJECT_MASTODON_VERSION="true" \
GTS_INSTANCE_LANGUAGES="pt" \
GTS_ACCOUNTS_ALLOW_CUSTOM_CSS="true" \
GTS_MEDIA_IMAGE_MAX_SIZE="16MiB" \
GTS_MEDIA_VIDEO_MAX_SIZE="99MiB" \
GTS_MEDIA_EMOJI_LOCAL_MAX_SIZE="256KiB" \
GTS_MEDIA_EMOJI_REMOTE_MAX_SIZE="256KiB" \
GTS_STATUSES_MAX_CHARS="5000000000" \
TZ="America/Sao_Paulo"
Deploy🔗
Usuário🔗
1) Criando usuário
fly ssh console \
-a antisocial \
-C "/gotosocial/gotosocial admin account create --username taconi --email taconi@mail.com --password '6c8d1433e7ab40b40bab0529192fd03b9125a6a0c9651858270cda19a78ffa87'"
2) Tornando o usuário admin
3) Pode ser necessário reiniciar sua instância após executar o comando:
A url será https://