-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.yaml
88 lines (80 loc) · 3.29 KB
/
manifest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
type: install
id: mastodon-docker
version: '1.0'
appVersion: latest
name: Mastodon
baseUrl: https://raw.githubusercontent.com/TaylorJadin/mastodon-docker-jps/main
logo: /mastodon.png
homepage: https://joinmastodon.org/
categories:
- apps/education
description:
text: "Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, video. All Mastodon servers are interoperable as a federated network (users on one server can seamlessly communicate with users from another one, including non-Mastodon software that implements ActivityPub)!"
short: Free, open-source decentralized social media platform.
globals:
dbPass: ${fn.password}
nodes:
nodeType: dockerengine
nodeGroup: cp
cloudlets: 32
fixedcloudlets: 10
extip: true
displayName: Mastodon server
volumes: ["/root/mastodon"]
settings:
fields:
- caption: Custom Domain
type: checkbox
name: use-custom-domain
value: true
disabled: false
tooltip: "If this option is disabled, Mastodon will be configured to use the environment URL for its domain name. Mastodon does not recommend changing domain names after setup."
showIf:
true:
- caption: Domain Name
type: string
name: custom-domain-name
onInstall:
- setup
- if (${settings.use-custom-domain:true}): setupCustomDomain
- start
actions:
setup:
- cmd[cp]: |-
yum update -y
mkdir -p /root/mastodon
cd /root/mastodon
docker pull lscr.io/linuxserver/mastodon
SECRET_KEY_BASE=`docker run --rm -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon secret`
OTP_SECRET=`docker run --rm -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon secret`
wget https://raw.githubusercontent.com/TaylorJadin/mastodon-docker-jps/main/docker-compose.yml
wget https://raw.githubusercontent.com/TaylorJadin/mastodon-docker-jps/main/.env
sed -i \
-e "s|DOMAIN=|DOMAIN=${env.domain}|" \
-e "s|LETSENCRYPT_EMAIL=|LETSENCRYPT_EMAIL=${user.email}|" \
-e "s|DATABASE_PASSWORD=|DATABASE_PASSWORD=${globals.dbPass}|" \
-e "s|SECRET_KEY_BASE=|SECRET_KEY_BASE=$SECRET_KEY_BASE|" \
-e "s|OTP_SECRET=|OTP_SECRET=$OTP_SECRET|" \
-e "/VAPID/d" \
.env
docker run --rm -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon mastodon:webpush:generate_vapid_key >> .env
echo "alias tootctl='docker exec -it -w /app/www mastodon bin/tootctl'" >> ~/.bashrc
- env.file.AddFavorite:
nodeGroup: cp
path: /root/mastodon
keyword: mastodon
setupCustomDomain:
- cmd[cp]: |-
cd /root/mastodon
sed -i \
-e "s|DOMAIN=.*|DOMAIN=${settings.custom-domain-name}|" \
.env
start:
- cmd[cp]: |-
cd /root/mastodon
docker-compose up -d
success: |
Mastodon is ready!
- Set up an owner account by using at the tootctl at the command line: `tootctl accounts create USERNAME [email protected] --confirmed --role Owner`
- You can configure SMTP for Mail, and set up S3 for media storage by editing the file at `/root/mastodon/.env`
- If you are mapping a custom domain, point an A record at **${nodes.cp.extIPs}**.