Improve Docker image tagging strategy and remove Swagger version
- Replace 'stable' tag with semver-based tags (1.2.3, 1.2, 1) - Use 'edge' tag for main branch instead of 'latest' - Reserve 'latest' tag only for tagged releases - Remove version from Swagger docs (tracked via git tags instead) - Document available image tags in README
This commit is contained in:
@@ -80,10 +80,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=tag
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
type=sha,prefix=sha-
|
type=sha,prefix=sha-
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=edge,enable={{is_default_branch}}
|
||||||
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ docker-compose up -d
|
|||||||
|
|
||||||
The API will be available at `http://localhost:8080`
|
The API will be available at `http://localhost:8080`
|
||||||
|
|
||||||
|
**Available image tags:**
|
||||||
|
- `latest`: Latest stable release (recommended for production)
|
||||||
|
- `1`, `1.0`, `1.0.0`: Specific version tags
|
||||||
|
- `edge`: Latest development build from main branch (unstable)
|
||||||
|
- `sha-abc123`: Specific commit (for debugging)
|
||||||
|
|
||||||
**Configuration options:**
|
**Configuration options:**
|
||||||
- `JWT_SECRET`: **Required**. Use a long random string
|
- `JWT_SECRET`: **Required**. Use a long random string
|
||||||
- `JWT_EXPIRY`: Token expiration (e.g., `24h`, `48h`)
|
- `JWT_EXPIRY`: Token expiration (e.g., `24h`, `48h`)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// @title Apocapoc API
|
// @title Apocapoc API
|
||||||
// @version 1.0
|
|
||||||
// @description Self-hosted habit tracking service
|
// @description Self-hosted habit tracking service
|
||||||
// @termsOfService http://swagger.io/terms/
|
// @termsOfService http://swagger.io/terms/
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1208,7 +1208,7 @@ const docTemplate = `{
|
|||||||
|
|
||||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||||
var SwaggerInfo = &swag.Spec{
|
var SwaggerInfo = &swag.Spec{
|
||||||
Version: "1.0",
|
Version: "",
|
||||||
Host: "",
|
Host: "",
|
||||||
BasePath: "/api/v1",
|
BasePath: "/api/v1",
|
||||||
Schemes: []string{},
|
Schemes: []string{},
|
||||||
|
|||||||
+1
-2
@@ -11,8 +11,7 @@
|
|||||||
"license": {
|
"license": {
|
||||||
"name": "MIT",
|
"name": "MIT",
|
||||||
"url": "https://opensource.org/licenses/MIT"
|
"url": "https://opensource.org/licenses/MIT"
|
||||||
},
|
}
|
||||||
"version": "1.0"
|
|
||||||
},
|
},
|
||||||
"basePath": "/api/v1",
|
"basePath": "/api/v1",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ info:
|
|||||||
url: https://opensource.org/licenses/MIT
|
url: https://opensource.org/licenses/MIT
|
||||||
termsOfService: http://swagger.io/terms/
|
termsOfService: http://swagger.io/terms/
|
||||||
title: Apocapoc API
|
title: Apocapoc API
|
||||||
version: "1.0"
|
|
||||||
paths:
|
paths:
|
||||||
/auth/login:
|
/auth/login:
|
||||||
post:
|
post:
|
||||||
|
|||||||
Reference in New Issue
Block a user