Skip to content

Commit 474404a

Browse files
committed
initial
0 parents  commit 474404a

File tree

19 files changed

+1793
-0
lines changed

19 files changed

+1793
-0
lines changed

.github/.DS_Store

8 KB
Binary file not shown.

.github/workflows/deploy.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Deploy XDatabase Proxy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
release:
10+
types: [created]
11+
12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: ${{ github.repository }}
15+
16+
jobs:
17+
build-and-push:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v4
29+
with:
30+
go-version: "1.23.4"
31+
32+
- name: Run tests
33+
run: go test -v ./...
34+
35+
- name: Log in to the Container registry
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ghcr.io
39+
username: hasirciogli
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Extract metadata for Docker
43+
id: meta
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: ghcr.io/hasirciogli/xdatabase-proxy
47+
tags: |
48+
type=ref,event=branch
49+
type=ref,event=pr
50+
type=semver,pattern={{version}}
51+
type=semver,pattern={{major}}.{{minor}}
52+
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: .
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
60+
61+
create-release:
62+
needs: build-and-push
63+
runs-on: ubuntu-latest
64+
if: startsWith(github.ref, 'refs/tags/v')
65+
permissions:
66+
contents: write
67+
steps:
68+
- name: Checkout code
69+
uses: actions/checkout@v4
70+
with:
71+
fetch-depth: 0
72+
73+
- name: Get version from tag
74+
id: get_version
75+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
76+
77+
- name: Install changelog-parser
78+
run: npm install -g changelog-parser
79+
80+
- name: Parse Changelog
81+
id: changelog
82+
run: |
83+
CHANGELOG_CONTENT=$(changelog-parser CHANGELOG.md)
84+
VERSION=${{ steps.get_version.outputs.VERSION }}
85+
VERSION_WITHOUT_V="${VERSION#v}"
86+
87+
# Extract the relevant version's changes
88+
CHANGES=$(echo "$CHANGELOG_CONTENT" | jq -r --arg v "$VERSION_WITHOUT_V" '.versions[] | select(.version==$v) | .body')
89+
90+
if [ -z "$CHANGES" ]; then
91+
echo "No changelog entry found for version $VERSION"
92+
CHANGES="## What's Changed in $VERSION\n* No changelog entry found for this version\n* Docker image tagged as $VERSION"
93+
fi
94+
95+
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
96+
echo -e "$CHANGES" >> $GITHUB_OUTPUT
97+
echo "EOF" >> $GITHUB_OUTPUT
98+
99+
- name: Create Release
100+
uses: softprops/action-gh-release@v1
101+
with:
102+
name: Release ${{ steps.get_version.outputs.VERSION }}
103+
body: ${{ steps.changelog.outputs.CHANGELOG }}
104+
draft: false
105+
prerelease: false
106+
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Initial project setup
13+
- Kubernetes deployment configurations
14+
- GitHub Actions workflow for automated deployments
15+
- Minikube test environment setup
16+
17+
### Changed
18+
19+
### Deprecated
20+
21+
### Removed
22+
23+
### Fixed
24+
25+
### Security
26+
27+
## [1.0.0] - 2025-03-15
28+
29+
### Added
30+
31+
- First stable release
32+
- Kubernetes deployment support
33+
- Automated deployments with GitHub Actions
34+
- Separate configurations for test and production environments
35+
- Container registry integration with GHCR
36+
37+
### Changed
38+
39+
- Optimized deployment strategy
40+
- Fine-tuned resource limits and requests
41+
- Enhanced build pipeline performance
42+
43+
### Security
44+
45+
- Added container security configurations
46+
- Implemented secure registry authentication
47+
- Added RBAC configurations

LICENSE

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
XDatabase Proxy Dual License
2+
3+
## Part 1: Open Source License
4+
5+
Copyright (c) 2024 XDatabase Proxy Contributors
6+
7+
Permission is hereby granted, free of charge, to any person or organization obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the following conditions:
8+
9+
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
11+
2. Organizations with annual revenue exceeding USD 100,000 must comply with Part 2 (Commercial License) of this license.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14+
15+
## Part 2: Commercial License
16+
17+
For organizations with annual revenue exceeding USD 100,000, the following tier-based pricing applies:
18+
19+
1. License Fee Tiers (Annual):
20+
21+
- Startup Tier (Revenue $100K - $1M): $500/year
22+
- Business Tier (Revenue $1M - $10M): $2,000/year
23+
- Enterprise Tier (Revenue $10M - $50M): $5,000/year
24+
- Corporate Tier (Revenue $50M+): $10,000/year
25+
26+
Each tier includes:
27+
28+
- Unlimited database instances
29+
- All features and updates
30+
- Email support (response within 2 business days)
31+
- Security patches and hotfixes
32+
33+
Additional services (optional):
34+
35+
- Priority support: +$2,000/year
36+
- Custom feature development: Quoted separately
37+
- On-site consultation: Quoted separately
38+
39+
2. Payment Terms:
40+
41+
- Fees are paid annually in advance
42+
- Payments are due within 30 days of license renewal
43+
- First payment is due before commercial usage begins
44+
45+
3. Usage Rights:
46+
47+
- Full rights to use, modify, and distribute the software
48+
- Access to commercial support based on tier level
49+
- Rights to create and distribute derivative works
50+
- Access to private repository and documentation
51+
52+
4. Obligations:
53+
54+
- Maintain accurate records of revenue
55+
- Annual revenue declaration for tier verification
56+
- Keep confidential any modifications or improvements
57+
- Report critical bugs and security issues
58+
59+
5. Term and Termination:
60+
- License remains in effect as long as payments are current
61+
- Termination occurs if payments are 60 days overdue
62+
- Upon termination, all usage rights revert to Open Source License terms
63+
- 30-day written notice required for voluntary termination
64+
65+
For commercial licensing inquiries or questions:
66+
Contact: github.com/hasirciogli/xdatabase-proxy/issues

0 commit comments

Comments
 (0)