Added freescout 1st run
This commit is contained in:
parent
9654af2b53
commit
90ba2a7ddf
@ -35,7 +35,7 @@ do_serviceprep() {
|
||||
docker exec pdns pdnsutil set-kind $DOMAIN_NEW native
|
||||
docker exec pdns pdnsutil set-meta $DOMAIN_NEW SOA-EDIT-API DEFAULT
|
||||
|
||||
for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation podcasts castopod caddy wordpress bookstack; do
|
||||
for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation podcasts castopod caddy wordpress bookstack freescout; do
|
||||
docker exec pdns pdnsutil add-record $DOMAIN_NEW $i A 86400 $EXTERNALIP
|
||||
done
|
||||
|
||||
@ -866,6 +866,23 @@ convert_bookstack() {
|
||||
|
||||
echo -ne "done."
|
||||
}
|
||||
convert_freescout() {
|
||||
#### Convert Freescout
|
||||
echo -ne "\n* Converting freescout.."
|
||||
|
||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/freescout/docker-compose.yml
|
||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/freescout/.env
|
||||
|
||||
docker exec postgresql bash -c "psql -U freescout -c \"update users set email='admin@$DOMAIN_NEW' where id='1'\""
|
||||
|
||||
# Grab the container IP from docker-compose
|
||||
SERVICE_IP=`grep ipv4_address /federated/apps/freescout/docker-compose.yml | awk '{ print $2 }'`
|
||||
|
||||
# Start service with command to make sure it's up before proceeding
|
||||
start_service_convert "freescout" "nc -z $SERVICE_IP 80 &> /dev/null"
|
||||
|
||||
echo -ne "done."
|
||||
}
|
||||
usage() {
|
||||
echo "$0: <domain.com> <organization name>"
|
||||
exit 2
|
||||
@ -902,25 +919,9 @@ do_serviceprep
|
||||
# Stop all services
|
||||
/federated/bin/stop all &> /dev/null
|
||||
|
||||
convert_powerdns
|
||||
convert_traefik
|
||||
convert_postgresql
|
||||
convert_ldap
|
||||
convert_mail
|
||||
convert_collabora
|
||||
convert_nextcloud
|
||||
convert_matrix
|
||||
convert_element
|
||||
convert_listmonk
|
||||
convert_vaultwarden
|
||||
convert_panel
|
||||
convert_wireguard
|
||||
convert_jitsi
|
||||
convert_baserow
|
||||
convert_gitea
|
||||
convert_caddy
|
||||
convert_castopod
|
||||
convert_autodiscover
|
||||
convert_wordpress
|
||||
convert_coturn
|
||||
convert_bookstack
|
||||
# Convert each services in SERVICES list
|
||||
for i in "${SERVICES[@]}"; do
|
||||
if [ -d "/federated/apps/$i" ]; then
|
||||
convert_$i;
|
||||
fi
|
||||
done
|
||||
|
@ -43,6 +43,7 @@ get_config() {
|
||||
. /federated/lib/wordpress.sh
|
||||
. /federated/lib/coturn.sh
|
||||
. /federated/lib/bookstack.sh
|
||||
. /federated/lib/freescout.sh
|
||||
|
||||
COUNTRIES=("AF" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BO" "BA" "BW" "BV" "BR" "IO" "BN" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "CI" "HR" "CU" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KP" "KR" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "MM" "NA" "NR" "NP" "NL" "AN" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RU" "RW" "SH" "KN" "LC" "PM" "VC" "VC" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SK" "SI" "SB" "SO" "ZA" "GS" "SS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "US" "UM" "UY" "UZ" "VU" "VE" "VE" "VN" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW")
|
||||
|
||||
|
86
lib/freescout.sh
Normal file
86
lib/freescout.sh
Normal file
@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Freescout Service
|
||||
|
||||
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
config_freescout() {
|
||||
echo -ne "\n* Configuring /federated/apps/freescout container.."
|
||||
spin &
|
||||
SPINPID=$!
|
||||
|
||||
if [ ! -d "/federated/apps/freescout" ]; then
|
||||
mkdir -p /federated/apps/freescout/data/data
|
||||
mkdir -p /federated/apps/freescout/data/www/logs
|
||||
fi
|
||||
|
||||
cat > /federated/apps/freescout/docker-compose.yml <<EOF
|
||||
version: "3.7"
|
||||
services:
|
||||
freescout:
|
||||
image: ghcr.io/tiredofit/docker-freescout:\${IMAGE_VERSION}
|
||||
container_name: freescout
|
||||
hostname: freescout.$DOMAIN
|
||||
domainname: $DOMAIN
|
||||
restart: always
|
||||
networks:
|
||||
federated:
|
||||
ipv4_address: 172.99.0.37
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./data/data:/data
|
||||
- ./data/www/logs:/www/logs
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.freescout.rule=Host(\`freescout.$DOMAIN\`)"
|
||||
- "traefik.http.routers.freescout.entrypoints=websecure"
|
||||
- "traefik.http.routers.freescout.tls.certresolver=letsencrypt"
|
||||
|
||||
networks:
|
||||
federated:
|
||||
external: true
|
||||
EOF
|
||||
|
||||
ADMINPASS=`cat /federated/apps/panel/.env | grep SMTP_PASSWORD | awk -F= '{ print $2 }'`
|
||||
FREESCOUT_SECRET=$(create_password);
|
||||
|
||||
cat > /federated/apps/freescout/.env <<EOF
|
||||
IMAGE_VERSION="latest_php8.2"
|
||||
ADMIN_EMAIL=admin@$DOMAIN
|
||||
ADMIN_PASS=$ADMINPASS
|
||||
SITE_URL=https://freescout.$DOMAIN
|
||||
DB_TYPE=pgsql
|
||||
DB_HOST=postgresql.$DOMAIN
|
||||
DB_USER=freescout
|
||||
DB_PASS=$FREESCOUT_SECRET
|
||||
DB_PORT=5432
|
||||
DB_NAME=freescout
|
||||
ENABLE_SSL_PROXY=TRUE
|
||||
DISPLAY_ERRORS=FALSE
|
||||
SMTP_HOST=mail.$DOMAIN
|
||||
SMTP_USER=admin
|
||||
SMTP_PASS=$ADMINPASS
|
||||
SMTP_TLS=true
|
||||
SMTP_PORT=587
|
||||
EOF
|
||||
chmod 600 /federated/apps/freescout/.env
|
||||
|
||||
# Create database and user in postgresql
|
||||
docker exec postgresql psql -U postgres -c "CREATE USER freescout WITH PASSWORD '$FREESCOUT_SECRET'"
|
||||
docker exec postgresql psql -U postgres -c "CREATE DATABASE freescout"
|
||||
docker exec postgresql psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE freescout TO freescout"
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
echo -ne "done."
|
||||
}
|
||||
start_freescout() {
|
||||
# Start service with command to make sure it's up before proceeding
|
||||
start_service "freescout" "nc -z 172.99.0.37 80 &> /dev/null" "7"
|
||||
|
||||
docker exec pdns pdnsutil add-record $DOMAIN freescout A 86400 $EXTERNALIP
|
||||
[ $? -ne 0 ] && fail "Couldn't add dns record for freescout"
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
echo -ne "done."
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Federated Computer functions
|
||||
|
||||
# Define all services
|
||||
SERVICES=("pdnsmysql" "pdns" "pdnsadmin" "traefik" "postgresql" "ldap" "mail" "collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack")
|
||||
SERVICES=("pdnsmysql" "pdns" "pdnsadmin" "traefik" "postgresql" "ldap" "mail" "collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack" "freescout")
|
||||
|
||||
fail() {
|
||||
echo -ne "FAILED\n\n$1\n\n"
|
||||
@ -436,15 +436,23 @@ Password = "$LISTMONKPASS"
|
||||
<td class="tg-0pky">No login</td>
|
||||
<td class="tg-0pky">No user access</td>
|
||||
<td class="tg-cul6"><a href="https://documentation.federated.computer/docs/getting_started/welcome/" target="_blank" rel="noopener noreferrer"><span style="color:#340096">Click here</span></a></td>
|
||||
<td class="tg-acii"><span style="color:#333;background-color:#FFF">Auto discovery is a service to provide automatic mail configurations for mail clients</span></td>
|
||||
<td class="tg-0pky">Auto discovery is a service to provide automatic mail configurations for mail clients</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-0pky">Bookstack</td>
|
||||
<td class="tg-0pky"><a href="https://bookstack.$DOMAIN/login" target="_blank" rel="noopener noreferrer"><span style="color:#340096">bookstack.$DOMAIN/login</span></a></td>
|
||||
<td class="tg-0pky"><a href="https://bookstack.$DOMAIN/login" target="_blank" rel="noopener noreferrer"><span style="color:#340096">bookstack.$DOMAIN</span></a></td>
|
||||
<td class="tg-0pky">admin@$DOMAIN<br>admin password above</td>
|
||||
<td class="tg-0pky">User access is separate from panel</td>
|
||||
<td class="tg-cul6"><a href="https://documentation.federated.computer/docs/getting_started/welcome/" target="_blank" rel="noopener noreferrer"><span style="color:#340096">Click here</span></a></td>
|
||||
<td class="tg-0pky">Bookstack is a simple, open-source, self-hosted, easy-to-use platform (Wiki) for organising and storing information.</td>
|
||||
<td class="tg-0pky">Bookstack is a simple, open-source, self-hosted, easy-to-use platform (Wiki) for organising and storing information</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-0pky">Freescout</td>
|
||||
<td class="tg-0pky"><a href="https://freescout.$DOMAIN/login" target="_blank" rel="noopener noreferrer"><span style="color:#340096">freescout.$DOMAIN</span></a></td>
|
||||
<td class="tg-0pky">admin@$DOMAIN<br>admin password above</td>
|
||||
<td class="tg-0pky">User access is separate from panel</td>
|
||||
<td class="tg-cul6"><a href="https://documentation.federated.computer/docs/getting_started/welcome/" target="_blank" rel="noopener noreferrer"><span style="color:#340096">Click here</span></a></td>
|
||||
<td class="tg-0pky">FreeScout is the super lightweight and powerful free open source help desk</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user