Retro Bulletin Board Systems on atproto. Web app and TUI.
lazy mirror of alyraffauf/atbbs
atbbs.xyz
forums
python
tui
atproto
bbs
1#!/bin/sh
2set -e
3
4: "${PUBLIC_URL:?PUBLIC_URL environment variable is required (e.g. https://atbbs.app)}"
5
6# Strip trailing slash.
7PUBLIC_URL="${PUBLIC_URL%/}"
8
9HTML=/usr/share/nginx/html
10
11# Substitute __PUBLIC_URL__ in the vite-emitted templates. Use | as sed
12# delimiter since PUBLIC_URL contains /.
13sed "s|__PUBLIC_URL__|${PUBLIC_URL}|g" \
14 "${HTML}/config.template.json" > "${HTML}/config.json"
15sed "s|__PUBLIC_URL__|${PUBLIC_URL}|g" \
16 "${HTML}/client-metadata.template.json" > "${HTML}/client-metadata.json"
17
18exec nginx -g 'daemon off;'