Init Mastodon
This commit is contained in:
parent
e026eeac35
commit
ce5f1f40ac
3 changed files with 105 additions and 0 deletions
28
run/mastodon/workspace/setup.sh
Normal file
28
run/mastodon/workspace/setup.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euox pipefail
|
||||
|
||||
# System repositories
|
||||
apt install -y curl wget gnupg apt-transport-https lsb-release ca-certificates
|
||||
# Node.js
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
# PostgreSQL
|
||||
wget -O /usr/share/keyrings/postgresql.asc https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||
echo "deb [signed-by=/usr/share/keyrings/postgresql.asc] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/postgresql.list
|
||||
# System packages
|
||||
apt update
|
||||
apt install -y \
|
||||
imagemagick ffmpeg libvips-tools libpq-dev libxml2-dev libxslt1-dev file git-core \
|
||||
g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf \
|
||||
bison build-essential libssl-dev libyaml-dev libreadline6-dev \
|
||||
zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev \
|
||||
nginx nodejs redis-server redis-tools postgresql postgresql-contrib \
|
||||
certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev
|
||||
# Yarn
|
||||
corepack enable
|
||||
# Creating the mastodon user
|
||||
useradd -m -s /bin/bash mastodon
|
||||
passwd -d mastodon
|
||||
# Postgresql
|
||||
su - postgres -c "psql -c 'CREATE USER mastodon CREATEDB;'"
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue