-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fcba999
Showing
11 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pre-commit-config.yaml | ||
.github/ | ||
trivy.* | ||
docs/ | ||
mkdocs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: docker | ||
directory: / | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "chore: " | ||
groups: | ||
baseimages: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "chore(ci): " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release-container: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
with: | ||
image: ghcr.io/radiorabe/redis | ||
name: redis | ||
display-name: RaBe Redis on UBI9 | ||
tags: minimal rhel9 ubi9 rabe redis | ||
cosign-base-image-only: true | ||
mkdocs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: none | ||
checks: none | ||
contents: write # for pushing gh-pages branch | ||
deployments: none | ||
issues: none | ||
packages: none | ||
pull-requests: none | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
id-token: none | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: pip install mkdocs mkdocs-material mkdocs-gen-files mkdocs-literate-nav mkdocs-section-index | ||
- run: mkdocs build | ||
- run: mkdocs gh-deploy | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Scheduled tasks | ||
|
||
on: | ||
schedule: | ||
- cron: '13 12 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
schedule-trivy: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
with: | ||
image-ref: 'ghcr.io/radiorabe/redis:latest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
|
||
jobs: | ||
semantic-release: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
secrets: | ||
RABE_ITREAKTION_GITHUB_TOKEN: ${{ secrets.RABE_ITREAKTION_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: ^src/api/client.js$ | ||
- id: end-of-file-fixer | ||
exclude: ^src/api/client.js$ | ||
- id: check-symlinks | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
- id: detect-aws-credentials | ||
args: | ||
- --allow-missing-credentials | ||
- id: detect-private-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM quay.io/sclorg/redis-6-c9s:20240228 as source | ||
FROM ghcr.io/radiorabe/ubi9-minimal:0.6.5 AS app | ||
|
||
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/redis \ | ||
HOME=/var/lib/redis \ | ||
REDIS_VERSION=6 \ | ||
REDIS_PREFIX=/usr \ | ||
REDIS_CONF=/etc/redis/redis.conf | ||
|
||
COPY --from=source /usr/share/container-scripts /usr/share/container-scripts | ||
COPY --from=source /usr/libexec/container-setup /usr/libexec/container-setup | ||
COPY --from=source /usr/bin/container-entrypoint /usr/bin/container-entrypoint | ||
COPY --from=source /usr/bin/run-redis /usr/bin/run-redis | ||
COPY --from=source /etc/redis /etc/redis | ||
|
||
RUN microdnf install -y \ | ||
shadow-utils \ | ||
&& useradd -u 1001 -r -g 0 -s /sbin/nologin \ | ||
-c "Redis User" redis \ | ||
&& microdnf install -y \ | ||
gettext \ | ||
policycoreutils \ | ||
policycoreutils-restorecond \ | ||
redis \ | ||
&& redis-server --version | grep -qe "^Redis server v=$REDIS_VERSION\." && echo "Found VERSION $REDIS_VERSION" \ | ||
&& mkdir -p /var/lib/redis/data \ | ||
&& chown -R redis:0 /var/lib/redis \ | ||
&& /usr/libexec/container-setup \ | ||
&& microdnf remove -y \ | ||
libsemanage \ | ||
policycoreutils \ | ||
policycoreutils-restorecond \ | ||
shadow-utils \ | ||
&& microdnf clean all \ | ||
&& [[ "$(id redis)" == "uid=1001(redis)"* ]] | ||
|
||
EXPOSE 6379 | ||
USER 1001 | ||
VOLUME /var/lib/redis/data | ||
ENTRYPOINT ["container-entrypoint"] | ||
CMD ["run-redis"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# RaBe Redis Image | ||
|
||
[Redis](https://redis.io) container image based on [RaBe UBI9 Minimal](https://github.com/radiorabe/container-image-ubi9-minimal). | ||
|
||
## Usage | ||
|
||
Run it like you would any redis image. | ||
|
||
## Release Management | ||
|
||
The CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/). | ||
The workflow is based on the [RaBe shared actions](https://radiorabe.github.io/actions/) | ||
and uses [go-semantic-commit](https://go-semantic-release.xyz/) | ||
to create new releases. | ||
|
||
The commit message should be structured as follows: | ||
|
||
``` | ||
<type>[optional scope]: <description> | ||
[optional body] | ||
[optional footer(s)] | ||
``` | ||
|
||
The commit contains the following structural elements, to communicate intent to the consumers of your library: | ||
|
||
1. **fix:** a commit of the type `fix` patches gets released with a PATCH version bump | ||
1. **feat:** a commit of the type `feat` gets released as a MINOR version bump | ||
1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:` gets released as a MAJOR version bump | ||
1. types other than `fix:` and `feat:` are allowed and don't trigger a release | ||
|
||
If a commit does not contain a conventional commit style message you can fix | ||
it during the squash and merge operation on the PR. | ||
|
||
## Build Process | ||
|
||
The CI/CD setup uses [Docker build-push Action](https://github.com/docker/build-push-action) | ||
to publish container images. The workflow is based on the [RaBe shared actions](https://radiorabe.github.io/actions/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* set primary color */ | ||
:root { | ||
--md-primary-fg-color: #00C9BF; | ||
--md-accent-fg-color: #00C9BF; | ||
} | ||
|
||
/* make code selectable on main */ | ||
.highlight .o { | ||
user-select: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Generate the code reference pages and navigation. | ||
From https://mkdocstrings.github.io/recipes/ | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
readme = Path("README.md").open("r") | ||
with mkdocs_gen_files.open("index.md", "w", encoding="utf-8") as index_file: | ||
index_file.writelines(readme.read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
site_name: Redis on UBI9 Minimal | ||
repo_url: https://github.com/radiorabe/container-image-redis | ||
repo_name: radiorabe/container-image-redis | ||
|
||
theme: | ||
name: "material" | ||
palette: | ||
# Palette toggle for dark mode | ||
- scheme: slate | ||
primary: '#00c9bf' | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to light mode | ||
# Palette toggle for light mode | ||
- scheme: default | ||
primary: '#00c9bf' | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
icon: | ||
repo: fontawesome/brands/git-alt | ||
features: | ||
- content.code.copy | ||
- toc.integrate | ||
|
||
markdown_extensions: | ||
- pymdownx.highlight: | ||
anchor_linenums: true | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.superfences | ||
|
||
extra_css: | ||
- css/style.css | ||
|
||
plugins: | ||
- search | ||
- gen-files: | ||
scripts: | ||
- docs/gen_ref_pages.py | ||
- literate-nav | ||
- section-index | ||
|
||
nav: | ||
- README: index.md | ||
|
||
watch: | ||
- README.md |