Skip to content

Instantly share code, notes, and snippets.

@sitedata
Forked from BusterNeece/Caddyfile
Created August 31, 2024 22:13
Show Gist options
  • Save sitedata/576ee52ce14faa2f8ee817a5d693862f to your computer and use it in GitHub Desktop.
Save sitedata/576ee52ce14faa2f8ee817a5d693862f to your computer and use it in GitHub Desktop.
AzuraCast demo server reset script
https://demo.azuracast.com/
tls self_signed
root src
redir / https://azuracast.com/ 302
log stdout
errors stdout
#!/usr/bin/env bash
mkdir -p /root/.caddy
# Remove all Docker containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker volume prune -f
# Run temporary Caddy server
docker run -d \
-e "CADDYPATH=/etc/caddycerts" \
-v /root/.caddy:/etc/caddycerts \
-v /root/Caddyfile:/etc/Caddyfile \
-p 80:80 -p 443:443 \
--name=azuracast_temp_caddy \
abiosoft/caddy
# Remove AzuraCast Directory
rm -rf /var/azuracast/www
# Re-clone AzuraCast codebase
mkdir -p /var/azuracast/www
cd /var/azuracast/www
git clone https://github.com/AzuraCast/AzuraCast.git .
# Re-copy fixtures
cp /root/00_azuratest_demo.sql /var/azuracast/www/util/fixtures/00_azuratest_radio.sql
cp /root/00_azuratest_demo.zip /var/azuracast/www/util/fixtures/00_azuratest_radio.zip
# Spin up Docker
docker-compose pull
docker-compose run --rm cli azuracast_install
# Pull down Caddy server
docker stop azuracast_temp_caddy
docker rm azuracast_temp_caddy
docker-compose up -d
docker-compose rm -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment