Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract version from csproj
id: get_version
run: |
VERSION=$(grep -m 1 '<Version>' ./WebApp/WebApp.csproj | sed -E 's/.*<Version>(.+)<\/Version>.*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: carlpaton/redis-administrator:latest
tags: |
carlpaton/redis-administrator:latest
carlpaton/redis-administrator:${{ steps.get_version.outputs.version }}

# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v2
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Changelog

## [LATEST] - 2025-07-02
## [1.0.0] - 2025-07-03

### Updates
- Migrate to .Net 7
- Semantic versioning

### Breaking Changes
- **Environment Variable Change:**
The environment variable for configuring the Redis connection string has changed.
**Old:** `REDIS_CONNECTION`
**New:** `Database__ConnectionString`
Update your deployment scripts and Docker run commands to use `--env Database__ConnectionString=your_connection_string` instead of `--env REDIS_CONNECTION=your_connection_string`
Update your deployment scripts and Docker run commands to use `--env Database__ConnectionString=your_connection_string` instead of `--env REDIS_CONNECTION=your_connection_string`

## Past Versions

All changes were pushed as [LATEST], they were simple changes like .Net Migrations and initial features like adding Redis types `String` and `SortedSet`.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing to RedisAdministrator

Thank you for your interest in contributing to RedisAdministrator!

## How to Contribute

1. **Fork the repository** and create your branch from `main`.
2. **Make your changes** with clear, descriptive commit messages.
3. **Update the version** in `WebApp/WebApp.csproj` if your changes introduce new features or breaking changes.
4. **Test your changes** to ensure nothing is broken.
5. **Submit a pull request** with a clear description of your changes and the motivation behind them.

## Guidelines

- Follow the existing code style and conventions.
- Write or update tests as appropriate.
- Document any new features or changes.
- Ensure your branch is up to date with the latest `master` branch before submitting your pull request.

## Questions?

If you have any questions, feel free to open an issue or reach out to the maintainers.

Thank you for helping improve RedisAdministrator!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker run --name red-admin -d -p 8081:80 --env Database__ConnectionString=red-s

## Contributing

Pull requests welcome!
Pull requests welcome, see [contributing](CONTRIBUTING.md) guidelines.

- [Local Setup](./docs/local-setup.md)
- [Redis Types](https://carlpaton.github.io/2022/02/redis-types/)
Expand Down
12 changes: 10 additions & 2 deletions WebApp/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,20 @@
</main>
</div>

@{
var assembly = System.Reflection.Assembly.GetExecutingAssembly();
var infoVersionAttr = assembly.GetCustomAttributes(typeof(System.Reflection.AssemblyInformationalVersionAttribute), false)
.Cast<System.Reflection.AssemblyInformationalVersionAttribute>()
.FirstOrDefault();
var version = infoVersionAttr?.InformationalVersion?.Split('+')[0] ?? assembly.GetName().Version.ToString();
}

<footer class="border-top footer text-muted">
<div class="container">
&copy; @DateTime.Now.ToString("yyyy") - <a asp-area="" asp-controller="Home" asp-action="Privacy">Redis Administrator</a>
is powered by <a href="https://getbootstrap.com/docs/4.0/getting-started/introduction/" target="_blank">Bootstrap</a>
, <a href="https://github.com/StackExchange/StackExchange.Redis/" target="_blank">StackExchange.Redis</a>
and .Net 7.0
and <a href="https://github.com/StackExchange/StackExchange.Redis/" target="_blank">StackExchange.Redis</a>
v @version
</div>
</footer>

Expand Down
1 change: 1 addition & 0 deletions WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>


Expand Down
12 changes: 6 additions & 6 deletions docs/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ This deploys to https://hub.docker.com/, merging to master also triggers [this a

I last did this with an integration from Github to Docker.com but they have since canned this feature and put it behind a paywall, I'll update here after I figure out how to do it.

1. build image with `docker build -t redis-administrator:develop .`
1. run it locally as `docker run --name red-admin-develop -d -p 8082:80 --network redis-bridge-network --env Database__ConnectionString=red-srv,allowAdmin=true redis-administrator:develop`
1. build image with `docker build -t redis-administrator:test .`
1. run it locally as `docker run --name red-admin-test -d -p 8082:80 --network redis-bridge-network --env Database__ConnectionString=red-srv,allowAdmin=true redis-administrator:test`
1. browse to http://localhost:8082

Now actually deploy

1. `docker login`, one time device confirmation opens docker.com for you to confirm
1. tag the image `docker tag redis-administrator:develop carlpaton/redis-administrator:develop`
1. now push `docker push carlpaton/redis-administrator:develop`
1. tag the image `docker tag redis-administrator:test carlpaton/redis-administrator:test`
1. now push `docker push carlpaton/redis-administrator:test`
1. browse and check the tag exists at https://hub.docker.com/r/carlpaton/redis-administrator/

Test the deployed image

1. delete local image tagged as `carlpaton/redis-administrator:develop`
1. run locally as `docker run --name red-admin-deploy -d -p 8083:80 --network redis-bridge-network --env Database__ConnectionString=red-srv,allowAdmin=true carlpaton/redis-administrator:develop` which should then pull from docker hub
1. delete local image tagged as `carlpaton/redis-administrator:test`
1. run locally as `docker run --name red-admin-deploy -d -p 8083:80 --network redis-bridge-network --env Database__ConnectionString=red-srv,allowAdmin=true carlpaton/redis-administrator:test` which should then pull from docker hub
1. browse to http://localhost:8083