Skip to content

Commit

Permalink
Fetched template changes (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Oct 20, 2024
1 parent aeb3558 commit a6d71b6
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 57 deletions.
16 changes: 8 additions & 8 deletions .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.16.0
_src_path: gh:radio-aktywne/template-app-litestar
_commit: 0.17.0
_src_path: gh:radio-aktywne/template-service-litestar
accountname: radio-aktywne
appname: emipass
description: WebRTC to SRT passthrough 💨
description: Broadcast streaming passthrough 🎤
docs: true
docsurl: https://radio-aktywne.github.io/app-emipass
docsurl: https://radio-aktywne.github.io/emipass
email: [email protected]
envprefix: EMIPASS
events: false
imagename: apps/emipass
imagename: services/emipass
importname: emipass
port: 11000
registry: true
releases: true
reponame: app-emipass
repourl: https://github.com/radio-aktywne/app-emipass
reponame: emipass
repourl: https://github.com/radio-aktywne/emipass
servicename: emipass
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-litestar:latest",
"image": "ghcr.io/radio-aktywne/devcontainers/service-litestar: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 @@ -37,9 +37,9 @@ jobs:
push: true
# Slashes are here to make the string multiline and avoid using spaces
tags: "\
ghcr.io/radio-aktywne/apps/emipass\
ghcr.io/radio-aktywne/services/emipass\
:latest,\
ghcr.io/radio-aktywne/apps/emipass\
ghcr.io/radio-aktywne/services/emipass\
:${{ github.event.release.tag_name }}"
# Cache Docker layers between builds
cache-from: type=gha,scope=${{ github.workflow }}
Expand Down
20 changes: 10 additions & 10 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-emipass)
[here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/emipass)
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-emipass)
[![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/emipass)

</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-emipass/blob/main/.github/workflows/lint.yaml).
[`.github/workflows/lint.yaml`](https://github.com/radio-aktywne/emipass/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 Down Expand Up @@ -133,23 +133,23 @@ This will update the `poetry.lock` file with the latest versions of the dependen

## ▶️ 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.

## 🧪 Testing

Expand All @@ -164,21 +164,21 @@ task test

Testing 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/test.yaml`](https://github.com/radio-aktywne/app-emipass/blob/main/.github/workflows/test.yaml).
[`.github/workflows/test.yaml`](https://github.com/radio-aktywne/emipass/blob/main/.github/workflows/test.yaml).

## 📦 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-emipass/blob/main/.github/workflows/registry.yaml).
[`.github/workflows/registry.yaml`](https://github.com/radio-aktywne/emipass/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-emipass).
[here](https://radio-aktywne.github.io/emipass).
All the documentation files are located in the `docs` directory.

To build and serve the documentation locally,
Expand All @@ -193,4 +193,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-emipass/blob/main/.github/workflows/docs.yaml).
[`.github/workflows/docs.yaml`](https://github.com/radio-aktywne/emipass/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,14 +32,14 @@ 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
RUN useradd --create-home app
# Create service user
RUN useradd --create-home service

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

# Copy Poetry files
COPY poetry.lock poetry.toml pyproject.toml ./
Expand Down Expand Up @@ -69,8 +69,8 @@ COPY .env.python .env.python

# Setup main entrypoint
COPY scripts/entrypoint.sh scripts/entrypoint.sh
ENTRYPOINT ["/app/scripts/entrypoint.sh", "poetry", "run", "--", "dotenv", "--file", ".env.python", "run", "--", "emipass"]
ENTRYPOINT ["/service/scripts/entrypoint.sh", "poetry", "run", "--", "dotenv", "--file", ".env.python", "run", "--", "emipass"]
CMD []

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

<div align="center">

WebRTC to SRT passthrough 💨
Broadcast streaming passthrough 🎤

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

</div>

Expand All @@ -21,9 +21,9 @@ WebRTC to SRT passthrough 💨
## 📄 Further Reading

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

## 💻 Development

Read more about how to develop the project
[here](https://github.com/radio-aktywne/app-emipass/blob/main/CONTRIBUTING.md).
[here](https://github.com/radio-aktywne/emipass/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 @@ -210,7 +210,7 @@ tasks:
pytest
{{ .CLI_ARGS }}
run:
desc: Run the app
desc: Run the service
interactive: true
cmds:
- task: install-internal
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/01-Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ slug: /
title: Index
---

# emipass app
# emipass

WebRTC to SRT passthrough 💨
Broadcast streaming passthrough 🎤

## 💡 About

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/02-Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ gst-launch-1.0 \

## Ping

You can check the status of the app by sending
You can check the status of the service by sending
either a `GET` or `HEAD` request to the `/ping` endpoint.
The app should respond with a `204 No Content` status code.
The service should respond with a `204 No Content` status code.

For example, you can use `curl` to do that:

Expand Down
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:

- `EMIPASS__SERVER__HOST` -
host to run the server on
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-emipass");
const url = new URL("https://radio-aktywne.github.io/emipass");

const config: Config = {
title: "emipass app docs",
title: "emipass 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: "emipass app docs",
title: "emipass docs",
logo: {
alt: "emipass app docs logo",
alt: "emipass docs logo",
src: "logo.svg?v=1",
},
items: [
{
href: "https://github.com/radio-aktywne/app-emipass",
href: "https://github.com/radio-aktywne/emipass",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package-mode = true
name = "emipass"
version = "0.8.0"
description = "WebRTC to SRT passthrough 💨"
description = "Broadcast streaming passthrough 🎤"
authors = ["radio-aktywne <[email protected]>"]

[tool.poetry.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

# Run as non-root user
# Use tini to handle signals
exec su-exec app tini -- "$@"
exec su-exec service tini -- "$@"
10 changes: 5 additions & 5 deletions src/emipass/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def _build_lifespan(

def _build_openapi_config(self) -> OpenAPIConfig:
return OpenAPIConfig(
# Title of the app
title="emipass app",
# Version of the app
# Title of the service
title="emipass",
# Version of the service
version=metadata.version("emipass"),
# Description of the app
summary="WebRTC to SRT passthrough 💨",
# Description of the service
summary="Broadcast streaming passthrough 🎤",
# Use handler docstrings as operation descriptions
use_handler_docstrings=True,
# Endpoint to serve the OpenAPI docs from
Expand Down
2 changes: 1 addition & 1 deletion src/emipass/config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class StreamerConfig(BaseModel):


class Config(BaseConfig):
"""Configuration for the application."""
"""Configuration for the service."""

server: ServerConfig = ServerConfig()
"""Configuration for the server."""
Expand Down
4 changes: 2 additions & 2 deletions src/emipass/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@


class State(LitestarState):
"""Use this class as a type hint for the state of the application."""
"""Use this class as a type hint for the state of the service."""

config: Config
"""Configuration for the application."""
"""Configuration for the service."""

streaming: StreamingService
"""Service to manage streaming."""

0 comments on commit a6d71b6

Please sign in to comment.