Skip to content

Commit

Permalink
Fetched template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras committed Oct 20, 2024
1 parent a8b3512 commit cc240ee
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 52 deletions.
16 changes: 8 additions & 8 deletions .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.5.0
_src_path: gh:radio-aktywne/template-app-liquidsoap
_commit: 0.6.0
_src_path: gh:radio-aktywne/template-service-liquidsoap
accountname: radio-aktywne
appname: emifuse
description: Audio streaming with Liquidsoap 🧼
description: Broadcast composing 🧼
docs: true
docsurl: https://radio-aktywne.github.io/app-emifuse
docsurl: https://radio-aktywne.github.io/emifuse
envprefix: EMIFUSE
imagename: apps/emifuse
imagename: services/emifuse
registry: true
releases: true
reponame: app-emifuse
repourl: https://github.com/radio-aktywne/app-emifuse
reponame: emifuse
repourl: https://github.com/radio-aktywne/emifuse
servicename: emifuse
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Use latest pre-built image
"image": "ghcr.io/radio-aktywne/devcontainers/app-liquidsoap:latest",
"image": "ghcr.io/radio-aktywne/devcontainers/service-liquidsoap:latest",
// Run arguments
"runArgs": [
// Use host UTS namespace
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
push: true
# Slashes are here to make the string multiline and avoid using spaces
tags: "\
ghcr.io/radio-aktywne/apps/emifuse\
ghcr.io/radio-aktywne/services/emifuse\
:latest,\
ghcr.io/radio-aktywne/apps/emifuse\
ghcr.io/radio-aktywne/services/emifuse\
:${{ github.event.release.tag_name }}"
# Cache Docker layers between builds
cache-from: type=gha,scope=${{ github.workflow }}
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ The whole development environment will be running inside a container.
If you open the project in `Visual Studio Code`,
you should be prompted to reopen the project in a `Dev Container`.
You can also click
[here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/app-emifuse)
[here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/emifuse)
or on the badge below to tell `Visual Studio Code`
to open the project in a `Dev Container`.

<div align="center">

[![Open in Dev Container](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/app-emifuse)
[![Open in Dev Container](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/emifuse)

</div>

Expand Down Expand Up @@ -100,7 +100,7 @@ Here are the most common ones, using `Task`:

Linting is automatically run on every pull request and push to the `main` branch.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/lint.yaml`](https://github.com/radio-aktywne/app-emifuse/blob/main/.github/workflows/lint.yaml).
[`.github/workflows/lint.yaml`](https://github.com/radio-aktywne/emifuse/blob/main/.github/workflows/lint.yaml).

If you use the `Dev Container` setup,
you will have the `Trunk` extension installed in `Visual Studio Code`.
Expand All @@ -109,37 +109,37 @@ so you can format with it by using any editor formatting features.

## ▶️ Running

To run the application, you can use the following command:
To run the service, you can use the following command:

```sh
task run
```

## 🐋 `Docker`

You can also run the application in a [`Docker`](https://www.docker.com) container.
You can also run the service in a [`Docker`](https://www.docker.com) container.

To do this, just run the following command:

```sh
task docker
```

This will build a `Docker` image and run the application in a container.
This will build a `Docker` image and run the service in a container.

## 📦 Releases

Every time you create a new release on `GitHub`,
a `GitHub Actions` workflow will automatically build and publish a new `Docker` image
to the `GitHub Container Registry`.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/registry.yaml`](https://github.com/radio-aktywne/app-emifuse/blob/main/.github/workflows/registry.yaml).
[`.github/workflows/registry.yaml`](https://github.com/radio-aktywne/emifuse/blob/main/.github/workflows/registry.yaml).

## 📄 Docs

This project uses [`Docusaurus`](https://docusaurus.io) to generate documentation.
The documentation is hosted on `GitHub Pages` and can be found
[here](https://radio-aktywne.github.io/app-emifuse).
[here](https://radio-aktywne.github.io/emifuse).
All the documentation files are located in the `docs` directory.

To build and serve the documentation locally,
Expand All @@ -154,4 +154,4 @@ This will start a local server that will serve the documentation.
The documentation is automatically built and deployed to `GitHub Pages`
whenever a commit is pushed to the `main` branch.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/docs.yaml`](https://github.com/radio-aktywne/app-emifuse/blob/main/.github/workflows/docs.yaml).
[`.github/workflows/docs.yaml`](https://github.com/radio-aktywne/emifuse/blob/main/.github/workflows/docs.yaml).
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ COPY --from=env /env/build/closure/ /nix/store/
COPY --from=env /env/build/activate /env/activate

# Set working directory to something other than root
WORKDIR /app/
WORKDIR /service/

# Create app user and data directory
RUN useradd --create-home app && \
# Create service user and data directory
RUN useradd --create-home service && \
mkdir --parents data/

# Setup entrypoint for RUN commands
COPY scripts/shell.sh scripts/shell.sh
SHELL ["/app/scripts/shell.sh"]
SHELL ["/service/scripts/shell.sh"]

# Copy OpenAPI schema
COPY openapi/ openapi/
Expand All @@ -50,8 +50,8 @@ COPY src/ src/

# Setup main entrypoint
COPY scripts/entrypoint.sh scripts/entrypoint.sh
ENTRYPOINT ["/app/scripts/entrypoint.sh", "liquidsoap", "src/main.liq"]
ENTRYPOINT ["/service/scripts/entrypoint.sh", "liquidsoap", "src/main.liq"]
CMD []

# Setup ownership
RUN chown --recursive app: ./
RUN chown --recursive service: ./
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<h1 align="center">emifuse app</h1>
<h1 align="center">emifuse</h1>

<div align="center">

Audio streaming with Liquidsoap 🧼
Broadcast composing 🧼

[![Lint](https://github.com/radio-aktywne/app-emifuse/actions/workflows/lint.yaml/badge.svg)](https://github.com/radio-aktywne/app-emifuse/actions/workflows/lint.yaml)
[![Image](https://github.com/radio-aktywne/app-emifuse/actions/workflows/image.yaml/badge.svg)](https://github.com/radio-aktywne/app-emifuse/actions/workflows/image.yaml)
[![Registry](https://github.com/radio-aktywne/app-emifuse/actions/workflows/registry.yaml/badge.svg)](https://github.com/radio-aktywne/app-emifuse/actions/workflows/registry.yaml)
[![Docs](https://github.com/radio-aktywne/app-emifuse/actions/workflows/docs.yaml/badge.svg)](https://github.com/radio-aktywne/app-emifuse/actions/workflows/docs.yaml)
[![Lint](https://github.com/radio-aktywne/emifuse/actions/workflows/lint.yaml/badge.svg)](https://github.com/radio-aktywne/emifuse/actions/workflows/lint.yaml)
[![Image](https://github.com/radio-aktywne/emifuse/actions/workflows/image.yaml/badge.svg)](https://github.com/radio-aktywne/emifuse/actions/workflows/image.yaml)
[![Registry](https://github.com/radio-aktywne/emifuse/actions/workflows/registry.yaml/badge.svg)](https://github.com/radio-aktywne/emifuse/actions/workflows/registry.yaml)
[![Docs](https://github.com/radio-aktywne/emifuse/actions/workflows/docs.yaml/badge.svg)](https://github.com/radio-aktywne/emifuse/actions/workflows/docs.yaml)

</div>

Expand All @@ -16,15 +16,14 @@ Audio streaming with Liquidsoap 🧼
## 💡 About

`emifuse` is a [`Liquidsoap`](https://www.liquidsoap.info)
server that fuses music from playlists and live audio
and sends one output stream to broadcast servers.
service for composing broadcast streams.

## 📄 Further Reading

More in-depth documentation can be found
[here](https://radio-aktywne.github.io/app-emifuse).
[here](https://radio-aktywne.github.io/emifuse).

## 💻 Development

Read more about how to develop the project
[here](https://github.com/radio-aktywne/app-emifuse/blob/main/CONTRIBUTING.md).
[here](https://github.com/radio-aktywne/emifuse/blob/main/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion Taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tasks:
docs
{{ .CLI_ARGS | default "start --host 0.0.0.0" }}
run:
desc: Run the app
desc: Run the service
interactive: true
cmds:
- >
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- "EMIFUSE__EMITUNES__HTTP__PATH=${EMIFUSE__EMITUNES__HTTP__PATH:-}"
network_mode: host
volumes:
- data:/app/data/
- data:/service/data/

volumes:
data: {}
7 changes: 3 additions & 4 deletions docs/docs/01-Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ slug: /
title: Index
---

# emifuse app
# emifuse

Audio streaming with Liquidsoap 🧼
Broadcast composing 🧼

## 💡 About

`emifuse` is a [`Liquidsoap`](https://www.liquidsoap.info)
server that fuses music from playlists and live audio
and sends one output stream to broadcast servers.
service for composing broadcast streams.
2 changes: 1 addition & 1 deletion docs/docs/03-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Configuration

## Environment variables

You can configure the app at runtime using various environment variables:
You can configure the service at runtime using various environment variables:

- `EMIFUSE__SERVER__SRT__PORT`
port to listen for SRT connections
Expand Down
10 changes: 5 additions & 5 deletions docs/docusaurus.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes } from "prism-react-renderer";

const url = new URL("https://radio-aktywne.github.io/app-emifuse");
const url = new URL("https://radio-aktywne.github.io/emifuse");

const config: Config = {
title: "emifusee app docs",
title: "emifusee docs",
favicon: "favicon.svg?v=1",

url: `${url.protocol}//${url.host}`,
Expand Down Expand Up @@ -41,14 +41,14 @@ const config: Config = {

themeConfig: {
navbar: {
title: "emifusee app docs",
title: "emifusee docs",
logo: {
alt: "emifusee app docs logo",
alt: "emifusee docs logo",
src: "logo.svg?v=1",
},
items: [
{
href: "https://github.com/radio-aktywne/app-emifusee",
href: "https://github.com/radio-aktywne/emifusee",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
Expand Down
4 changes: 2 additions & 2 deletions openapi/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
info:
title: emifuse app
description: Audio streaming with Liquidsoap 🧼
title: emifuse
description: Broadcast composing 🧼
openapi: 3.1.0
servers:
- url: /
Expand Down
4 changes: 2 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
. /env/activate

# Set permissions
chown --recursive app: data/
chown --recursive service: data/

# Run as non-root user
# Use tini to handle signals
exec su-exec app tini -- "$@"
exec su-exec service tini -- "$@"

0 comments on commit cc240ee

Please sign in to comment.