====== Sediment ======
| Verantwortung | Malte |
| Container | sediment |
| W. Ports | keine |
| OS | Debian 12.5 |
| Server | [[infrastruktur:server:magrathea]] |
| Zustand | Produktiv |
{{tag>infrasystem container magrathea productive malte}}
Hier findet sich die technische Dokumentation des Chaotikum Sediment. [[hackspace:infrastruktur:sediment|Die Nutzungshinweise finden sich hier]].
===== Services =====
^ Serviceübersicht ^ Version ^
| Sediment | 0.5.0-alpha |
====Sediment====
Sediment wird von Malte entwickelt. [[https://git.chaotikum.org/sediment/sediment|Der Quelltext liegt in unserem Gitlab]].
=== Installation Protocol ===
Install dependencies:
apt install build-essential patch zlib1g-dev liblzma-dev libsqlite3-dev nodejs curl
[[https://rvm.io|Install RVM]]:
Install GPG keys:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Install RVM:
\curl -sSL https://get.rvm.io | bash -s stable
Install Ruby:
rvm install ruby-3.1.4
[[https://yarnpkg.com/lang/en/docs/install/#debian-stable|Install yarn]]:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt remove cmdtest
apt update
apt install yarn
Clone code
git clone https://git.chaotikum.org/malte/sediment.git
Install ruby dependencies
bundle install
Create empty database
rake db:setup RAILS_ENV=production
Precompile static assets
rake assets:precompile
=== Systemd Service ===
Create systemd service ''/etc/systemd/system/sediment.service''
[Unit]
Description=sediment
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/root/sediment/
Environment=RAILS_ENV=production
Environment=RAILS_SERVE_STATIC_FILES=true
Environment=SEDIMENT_OPENID_DISPLAY_NAME='Chaotikum Account'
Environment=SEDIMENT_OPENID_AUTH_URI='https://me.chaotikum.org/auth/realms/Chaotikum/protocol/openid-connect/auth'
Environment=SEDIMENT_OPENID_TOKEN_URI='https://me.chaotikum.org/auth/realms/Chaotikum/protocol/openid-connect/token'
Environment=SEDIMENT_OPENID_CLIENT_ID='sediment'
Environment=SEDIMENT_OPENID_CLIENT_SECRET='****************'
Environment=SEDIMENT_OPENID_SCOPE='email profile openid'
Environment=SEDIMENT_OPENID_LOGOUT_URL='https://me.chaotikum.org/auth/realms/Chaotikum/protocol/openid-connect/logout'
Environment=SEDIMENT_OPENID_GROUP_KEY='groups'
Environment=SEDIMENT_OPENID_GROUP_VALUE='/freigeschaltet'
Environment=SECRET_KEY_BASE=**********************
Environment=SMTP_ADDRESS=mail.chaotikum.net
Environment=SMTP_PORT=587
Environment=SMTP_USER=sediment
Environment=SMTP_PASSWORD='**************'
Environment=SMTP_AUTHENTICATION=plain
Environment=SMTP_ENABLE_STARTTLS_AUTO=1
Environment=MAILER_FROM=sediment@chaotikum.org
Environment=MAILER_HOST=sediment.chaotikum.org
Environment=MAILER_PORT=80
Environment=SEDIMENT_FOOTER_LINK_1='https://chaotikum.org|Chaotikum'
Environment=SEDIMENT_FOOTER_LINK_2='https://chaotikum.org/impressum|Impressum'
Environment=SEDIMENT_FOOTER_LINK_3='https://chaotikum.org/datenschutzerk|Datenschutzerklärung'
ExecStart=/usr/local/rvm/bin/rvm 3.1.4@sediment do bundle exec rails s -e production -p 80
Restart=always
[Install]
WantedBy=multi-user.target
=== Starting The Service ===
Enable and start systemd service
systemctl enable sediment
systemctl start sediment
=== Creating The First Admin User ===
Use the web interface to register a normal user.
Run console in production environment
rails console -e production
Inside the console:
u = User.find_by_email("your@email.address")
u.admin = true
u.save!
===== Wartung =====
In das Textfeld einfach das Datum der Wartung eintragen, am besten in der Form yyyy-mm-dd.
{{NEWPAGE>infrastruktur:wartung:sediment#pagetemplates:wartungstemplate:sediment|Sediment
}}
{{topic>:infrastruktur:wartung?wartungsfenster +sediment &nodate&nouser&desc&table}}
~~NOCACHE~~