Compare commits
No commits in common. "a458a85823d1653841d9bb06507f4d1a846bad5b" and "a2ae329d54afb9a987da269d758aefe9a65f2dd1" have entirely different histories.
a458a85823
...
a2ae329d54
|
|
@ -1,8 +0,0 @@
|
|||
docker/
|
||||
music/
|
||||
data/
|
||||
*.org
|
||||
docker-compose.yml
|
||||
Dockerfile*
|
||||
Makefile
|
||||
.git/
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
FROM debian:bookworm-slim AS builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl openssl ca-certificates \
|
||||
git make sbcl rlwrap && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy asteroid source to container workdir
|
||||
COPY . .
|
||||
|
||||
# Download Quicklisp installer
|
||||
RUN curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||
|
||||
# Installs quicklisp and radiance
|
||||
RUN sbcl --eval "(load \"quicklisp.lisp\")" \
|
||||
--eval "(quicklisp-quickstart:install)" \
|
||||
--eval "(ql-dist:install-dist \"http://dist.shirakumo.org/shirakumo.txt\" :prompt nil)" \
|
||||
--eval "(ql:quickload :radiance)"
|
||||
|
||||
# Makes the project workdir known as a quicklisp project
|
||||
RUN mkdir -p $HOME/.config/common-lisp/source-registry.conf.d
|
||||
RUN echo '(:tree "/app/")' >> "$HOME/.config/common-lisp/source-registry.conf.d/projects.conf"
|
||||
|
||||
# Builds Asteroid binary
|
||||
RUN make
|
||||
|
||||
# Links binary to path
|
||||
ENV PATH="$PATH:/app"
|
||||
|
||||
# Adds radiance system configuration file
|
||||
COPY docker/radiance-default.conf.lisp $HOME/.config/radiance/default/radiance-core/radiance-core.conf.lisp
|
||||
|
||||
# Application
|
||||
EXPOSE 8080
|
||||
# Slynk server
|
||||
EXPOSE 4009
|
||||
|
||||
ENV ASTEROID_STREAM_URL=http://localhost:8000
|
||||
|
||||
CMD [ "asteroid" ]
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
services:
|
||||
asteroid:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: Dockerfile.asteroid
|
||||
image: asteroid/app
|
||||
container_name: asteroid
|
||||
environment:
|
||||
- ASTEROID_STREAM_URL=${ASTEROID_STREAM_URL:-http://localhost:8000}
|
||||
volumes:
|
||||
- ${MUSIC_LIBRARY:-../music/library}:/app/music/library:ro
|
||||
- ${QUEUE_PLAYLIST:-../stream-queue.m3u}:/app/stream-queue.m3u
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
|
|
@ -24,9 +24,9 @@ services:
|
|||
depends_on:
|
||||
- icecast
|
||||
volumes:
|
||||
- ${MUSIC_LIBRARY:-../music/library}:/app/music:ro
|
||||
- ../music/library:/app/music:ro
|
||||
- ./asteroid-radio-docker.liq:/app/asteroid-radio.liq:ro
|
||||
- ${QUEUE_PLAYLIST:-../stream-queue.m3u}:/app/stream-queue.m3u:ro
|
||||
- ../stream-queue.m3u:/app/stream-queue.m3u:ro
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- asteroid-network
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
; meta (:version 1.0 :package "RADIANCE-CORE")
|
||||
((:interfaces (:admin . "r-simple-admin") (:auth . "r-simple-auth")
|
||||
(:ban . "r-simple-ban") (:cache . "r-simple-cache")
|
||||
(:data-model . "r-simple-model") (:database . "i-lambdalite")
|
||||
(:relational-database . "i-sqlite") (:logger . "i-verbose")
|
||||
(:mail . "i-smtp") (:profile . "r-simple-profile") (:rate . "r-simple-rate")
|
||||
(:server . "i-hunchentoot") (:session . "r-simple-sessions")
|
||||
(:user . "r-simple-users"))
|
||||
(:versions
|
||||
. [hash-table equal ("radiance-core" :|2.2.0|) ("i-hunchentoot" :|1.1.0|)
|
||||
("asteroid" :|0.0.0|) ("i-log4cl" :|1.0.0|) ("r-clip" :|1.0.0|)
|
||||
("r-data-model" :|1.0.1|) ("i-lambdalite" :|1.0.0|)
|
||||
("r-simple-users" :|1.0.1|)
|
||||
("r-simple-errors" :|1.0.0|) ("i-verbose" :|1.0.0|)
|
||||
("r-simple-auth" :|1.0.0|) ("r-simple-sessions" :|1.0.1|)
|
||||
("r-ratify" :|1.0.0|) ("r-simple-rate" :|1.0.0|)
|
||||
("r-simple-profile" :|1.0.0|)])
|
||||
(:domains "radiance" "localhost")
|
||||
(:startup :r-simple-errors :r-simple-sessions) (:routes)
|
||||
(:debugger . :if-swank-connected))
|
||||
|
|
@ -380,11 +380,7 @@ sudo systemctl reload nginx
|
|||
|
||||
* Docker Management
|
||||
|
||||
** Stream Services
|
||||
|
||||
The stream services can be managed using docker from inside the =docker= folder on this repository.
|
||||
|
||||
*** Container Management
|
||||
** Container Management
|
||||
#+BEGIN_SRC bash
|
||||
# Start services
|
||||
docker compose up -d
|
||||
|
|
@ -399,42 +395,11 @@ docker compose logs -f
|
|||
docker compose restart
|
||||
#+END_SRC
|
||||
|
||||
*** Docker Configuration
|
||||
** Docker Configuration
|
||||
See =docker/docker-compose.yml= for complete Docker setup with Icecast2 and Liquidsoap containers. The setup includes:
|
||||
- **Icecast2**: Streaming server with three output formats
|
||||
- **Liquidsoap**: Audio processing and stream generation
|
||||
- **Music Volume**: Mounted to the =./music/library= directory (can also be set with the =MUSIC_LIBRARY= environment variable)
|
||||
- *Queue Playlist*: Mounted to the =./stream-queue.m3u= file (can also be set with the =QUEUE_PLAYLIST= environment variable)
|
||||
|
||||
** Asteroid Radio Application
|
||||
|
||||
The asteroid radio application can also be served and managed using docker from inside the =docker= folder on this repository.
|
||||
|
||||
*** Container Management
|
||||
#+BEGIN_SRC bash
|
||||
# Build service
|
||||
docker compose -f docker-compose.asteroid.yml build
|
||||
|
||||
# Start service
|
||||
docker compose -f docker-compose.asteroid.yml up -d
|
||||
|
||||
# Stop service
|
||||
docker compose -f docker-compose.asteroid.yml down
|
||||
|
||||
# View logs
|
||||
docker compose -f docker-compose.asteroid.yml logs -f
|
||||
|
||||
# Restart service
|
||||
docker compose -f docker-compose.asteroid.yml restart
|
||||
#+END_SRC
|
||||
|
||||
*** Docker Configuration
|
||||
See =docker/docker-compose.asteroid.yml= for complete Docker setup, which includes:
|
||||
- Buils the application using the current cloned branch for the repository
|
||||
- Uses the host network for easy access to the stream endpoint
|
||||
- *Stream endpoint* mapped to =http://localhost:8000= (can also be set with the =ASTEROID_STREAM_URL= environment variable)
|
||||
- **Music Volume**: Mounted to the =./music/library= directory (can also be set with the =MUSIC_LIBRARY= environment variable)
|
||||
- *Queue Playlist*: Mounted to the =./stream-queue.m3u= file (can also be set with the =QUEUE_PLAYLIST= environment variable)
|
||||
- **Music Volume**: Mounted from =./music/= directory
|
||||
|
||||
* Initial Configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -282,15 +282,12 @@
|
|||
;; Fallback to delayed initialization
|
||||
(bt:make-thread
|
||||
(lambda ()
|
||||
(dotimes (a 5)
|
||||
(unless (db:connected-p)
|
||||
(sleep 3)) ; Give database more time to initialize
|
||||
(handler-case
|
||||
(progn
|
||||
(format t "Retrying user management setup...~%")
|
||||
(create-default-admin)
|
||||
(format t "User management initialization complete.~%")
|
||||
(return))
|
||||
(error (e)
|
||||
(format t "Error initializing user system: ~a~%" e)))))
|
||||
(sleep 3) ; Give database more time to initialize
|
||||
(handler-case
|
||||
(progn
|
||||
(format t "Retrying user management setup...~%")
|
||||
(create-default-admin)
|
||||
(format t "User management initialization complete.~%"))
|
||||
(error (e)
|
||||
(format t "Error initializing user system: ~a~%" e))))
|
||||
:name "user-init"))))
|
||||
|
|
|
|||
Loading…
Reference in New Issue