Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
97f2d13
Upgrade to .NET 10 deps
mythz Dec 1, 2025
a92e042
Update MyApp.ServiceInterface.csproj
mythz Dec 2, 2025
bb03d0d
Add CLAUDE.md / AGENTS.md
mythz Dec 2, 2025
053c561
Update AGENTS.md
mythz Dec 2, 2025
44e412b
Update AGENTS.md
mythz Dec 2, 2025
4f6547b
Delete NuGet.Config
mythz Dec 2, 2025
3e2796c
Update build.yml
mythz Dec 2, 2025
7cd6f7a
Update Program.cs
mythz Dec 3, 2025
4e843b2
Update README.md
mythz Dec 3, 2025
843c0ff
Listen on all interfaces (both IPv4 and IPv6)
mythz Dec 3, 2025
0325172
updates
mythz Dec 3, 2025
4c9175d
Update package.json
mythz Dec 3, 2025
fd343d5
Add NuGet.Config
mythz Dec 3, 2025
748188f
Update docs link
mythz Dec 3, 2025
d91746c
fix footer links
mythz Dec 3, 2025
367f928
Update README.md
mythz Dec 3, 2025
55200b0
Update README.md
mythz Dec 3, 2025
e9075b7
update img link
mythz Dec 3, 2025
9e1d153
Update README.md
mythz Dec 3, 2025
0aaf200
Upgrade npm deps
mythz Dec 3, 2025
1949463
delete NuGet.Config
mythz Dec 4, 2025
b9489ef
switch to new RunNodeProcess
mythz Dec 5, 2025
108ec3d
delete NuGet.Config
mythz Dec 5, 2025
3bef9ef
Update vite.config.ts
mythz Dec 6, 2025
b0e80de
Update vite.config.ts
mythz Dec 6, 2025
6d8b244
update styles
mythz Dec 6, 2025
6afab2e
update
mythz Dec 6, 2025
e152b14
Update README.md
mythz Dec 7, 2025
202b10d
Update Footer
mythz Dec 7, 2025
f54e2eb
fix spelling
mythz Dec 8, 2025
3b206aa
upgrade npm deps
mythz Dec 12, 2025
3e54569
Update GitHub Actions
mythz Dec 13, 2025
b97fcf3
Update .gitignore
mythz Dec 13, 2025
7a6afbd
Update ApplicationUser.cs
mythz Dec 13, 2025
eb204a9
Update package.json
mythz Dec 13, 2025
718023f
Add require Identity jquery lib to /public/lib
mythz Feb 14, 2026
a0632d9
Add 2026 License Key
mythz Feb 14, 2026
0e6c60c
Create SECURITY.md for security policy
minyarzar7plus-design Jul 17, 2026
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
30 changes: 7 additions & 23 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,17 @@ jobs:

- name: Set up environment variables
run: |
echo "image_repository_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "repository_name=$(echo ${{ github.repository }} | cut -d '/' -f 2)" >> $GITHUB_ENV
echo "repository_name_lower=$(echo ${{ github.repository }} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "org_name=$(echo ${{ github.repository }} | cut -d '/' -f 1)" >> $GITHUB_ENV
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
repo_name="$(echo ${{ github.repository }} | cut -d '/' -f 2)"

# Set SERVICE_LABEL: derive from GITHUB_REPOSITORY (replace dots with dashes)
echo "SERVICE_LABEL=$(echo ${{ github.repository }} | cut -d '/' -f 2 | tr '.' '-')" >> $GITHUB_ENV
# Set SERVICE: derive from repo name (replace dots with dashes)
echo "SERVICE=$(echo $repo_name | tr '[:upper:]' '[:lower:]' | tr '.' '-')" >> $GITHUB_ENV

# Set KAMAL_DEPLOY_HOST: use secret if available, otherwise use repository name
if [ -n "${{ secrets.KAMAL_DEPLOY_HOST }}" ]; then
DEPLOY_HOST="${{ secrets.KAMAL_DEPLOY_HOST }}"
else
DEPLOY_HOST="$(echo ${{ github.repository }} | cut -d '/' -f 2)"
DEPLOY_HOST="$repo_name"
fi

# Validate KAMAL_DEPLOY_HOST contains at least one '.'
Expand All @@ -56,7 +54,7 @@ jobs:
KAMAL_DEPLOY_IP: ${{ secrets.KAMAL_DEPLOY_IP }}
if: env.KAMAL_DEPLOY_IP != null
run: |
sed -i 's#<ContainerLabel Include="service" Value="my-app" />#<ContainerLabel Include="service" Value="${{ env.repository_name_lower }}" />#g' MyApp/MyApp.csproj
sed -i 's#<ContainerLabel Include="service" Value="my-app" />#<ContainerLabel Include="service" Value="${{ env.SERVICE }}" />#g' MyApp/MyApp.csproj

- name: Check for Client directory and package.json
id: check_client
Expand All @@ -83,20 +81,6 @@ jobs:
working-directory: ./MyApp.Client
run: npm run build

- name: Install x tool
run: dotnet tool install -g x

- name: Apply Production AppSettings
env:
APPSETTINGS_PATCH: ${{ secrets.APPSETTINGS_PATCH }}
if: env.APPSETTINGS_PATCH != null
working-directory: ./MyApp
run: |
cat <<EOF >> appsettings.json.patch
${{ secrets.APPSETTINGS_PATCH }}
EOF
x patch appsettings.json.patch

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -115,7 +99,7 @@ jobs:
KAMAL_DEPLOY_HOST: ${{ secrets.KAMAL_DEPLOY_HOST }}
run: |
dotnet publish --os linux --arch x64 -c Release \
-p:ContainerRepository=${{ env.image_repository_name }} \
-p:ContainerRepository=${{ env.IMAGE }} \
-p:ContainerRegistry=ghcr.io -p:ContainerImageTags=latest \
-p:ContainerPort=80 \
-p:ContainerEnvironmentVariable="SERVICESTACK_LICENSE=${{ env.SERVICESTACK_LICENSE }}"
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Restore NuGet packages (use repo NuGet.config)
run: dotnet restore MyApp.slnx --configfile ./NuGet.Config
- name: Restore NuGet packages
run: dotnet restore MyApp.slnx

# If your feed requires authentication, enable and configure the step below.
# This example uses a Personal Access Token stored in secrets.NUGET_API_KEY.
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
env:
DOCKER_BUILDKIT: 1
SERVICESTACK_LICENSE: ${{ secrets.SERVICESTACK_LICENSE }}
APPSETTINGS_JSON: ${{ secrets.APPSETTINGS_JSON }}
KAMAL_DEPLOY_IP: ${{ secrets.KAMAL_DEPLOY_IP }}
KAMAL_DEPLOY_HOST: ${{ secrets.KAMAL_DEPLOY_HOST }}
KAMAL_REGISTRY_USERNAME: ${{ github.actor }}
Expand All @@ -28,12 +29,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5

- name: Encode APPSETTINGS_JSON for runtime
if: env.APPSETTINGS_JSON != null
run: |
# Base64 encode to avoid shell/YAML quoting issues; keep as a single env var.
b64=$(printf '%s' "$APPSETTINGS_JSON" | base64 -w0)
echo "APPSETTINGS_JSON_BASE64=$b64" >> $GITHUB_ENV

- name: Set up environment variables
run: |
echo "image_repository_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "repository_name=$(echo ${{ github.repository }} | cut -d '/' -f 2)" >> $GITHUB_ENV
echo "repository_name_lower=$(echo ${{ github.repository }} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "org_name=$(echo ${{ github.repository }} | cut -d '/' -f 1)" >> $GITHUB_ENV
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
repo_name="$(echo ${{ github.repository }} | cut -d '/' -f 2)"
echo "SERVICE=$(echo $repo_name | tr '[:upper:]' '[:lower:]' | tr '.' '-')" >> $GITHUB_ENV
if find . -maxdepth 2 -type f -name "Configure.Db.Migrations.cs" | grep -q .; then
echo "HAS_MIGRATIONS=true" >> $GITHUB_ENV
else
Expand Down Expand Up @@ -73,22 +80,22 @@ jobs:
- name: Ensure directories exist with correct permissions
run: |
echo "Creating directories with correct permissions"
kamal server exec "mkdir -p /opt/docker/${{ env.repository_name }}/App_Data /opt/docker/${{ env.repository_name }}/initdb.d"
kamal server exec "mkdir -p /opt/docker/${{ env.SERVICE }}/App_Data /opt/docker/${{ env.SERVICE }}/initdb.d"

echo "Setting app file permissions"
kamal server exec "chown -R 1654:1654 /opt/docker/${{ env.repository_name }}/App_Data /opt/docker/${{ env.repository_name }}/initdb.d"
kamal server exec "chown -R 1654:1654 /opt/docker/${{ env.SERVICE }}/App_Data /opt/docker/${{ env.SERVICE }}/initdb.d"

- name: Check if first run and execute kamal app boot if necessary
run: |
FIRST_RUN_FILE="~/first-run/${{ env.repository_name }}"
FIRST_RUN_FILE="~/first-run/${{ env.SERVICE }}"
if ! kamal server exec -q "test -f $FIRST_RUN_FILE"; then
kamal server exec -q "mkdir -p ~/first-run && touch $FIRST_RUN_FILE" || true

if [ -n "${{env.INIT_DB_SQL}}" ]; then
echo "Initializing DB with INIT_DB_SQL secret..."
# Save the SQL content to a temporary file
echo "${{ env.INIT_DB_SQL }}" > init-db.sql
cat init-db.sql | kamal server exec -i "cat > /opt/docker/${{ env.repository_name }}/initdb.d/${{ env.repository_name }}.sql" && rm init-db.sql || true
cat init-db.sql | kamal server exec -i "cat > /opt/docker/${{ env.SERVICE }}/initdb.d/${{ env.SERVICE }}.sql" && rm init-db.sql || true
fi
# Start all kamal accessories
kamal accessory boot all || true
Expand All @@ -101,13 +108,13 @@ jobs:

- name: Verify file permissions before deploy
run: |
kamal server exec --no-interactive "chown -R 1654:1654 /opt/docker/${{ env.repository_name }}/App_Data /opt/docker/${{ env.repository_name }}/initdb.d"
kamal server exec --no-interactive "chown -R 1654:1654 /opt/docker/${{ env.SERVICE }}/App_Data /opt/docker/${{ env.SERVICE }}/initdb.d"

- name: Deploy with Kamal
run: |
kamal lock release -v
kamal server exec --no-interactive 'echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin'
kamal server exec --no-interactive 'docker pull ghcr.io/${{ env.image_repository_name }}:latest'
kamal server exec --no-interactive 'docker pull ${{ env.IMAGE }}:latest'
kamal deploy -P --version latest

- name: Migration
Expand Down
Loading