Skip to content

Commit

Permalink
feat: support deploy Docker Image to AliyunCR (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang authored Jun 20, 2023
1 parent f3a2a07 commit d0fe56b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,21 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to AliyunCR
uses: docker/login-action@v2
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALIYUN_CR_USERNAME }}
password: ${{ secrets.ALIYUN_CR_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ahoowang/cosec-gateway
ghcr.io/ahoo-wang/cosec-gateway
registry.cn-shanghai.aliyuncs.com/ahoo/cosec-gateway
tags: |
type=ref,event=branch
type=ref,event=pr
Expand Down
2 changes: 1 addition & 1 deletion cosec-gateway-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG APP_NAME=cosec-gateway-server
ARG WORK_HOME=/opt/${APP_NAME}

FROM openjdk:17.0.2-jdk-slim AS base
FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:17 AS base

FROM base as build
ARG WORK_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# limitations under the License.
#
group=me.ahoo.cosec
version=2.0.0
version=2.0.1
description=RBAC-based And Policy-based Multi-Tenant Reactive Security Framework.
website=https://github.com/Ahoo-Wang/CoSec
issues=https://github.com/Ahoo-Wang/CoSec/issues
Expand Down
18 changes: 17 additions & 1 deletion k8s/cosec-gateway-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ spec:
metadata:
labels:
app: cosec-gateway
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
spec:
containers:
- env:
- name: LANG
value: C.utf8
- name: SPRING_DATA_REDIS_CLUSTER_NODES
valueFrom:
secretKeyRef:
name: redis-secret
key: nodes
- name: SPRING_DATA_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-secret
key: password
- name: SPRING_DATA_REDIS_CLUSTER_MAX_REDIRECTS
value: "3"
- name: TZ
value: Asia/Shanghai
image: ahoowang/cosec-gateway:lastVersion
image: registry.cn-shanghai.aliyuncs.com/ahoo/cosec-gateway:2.0.1
startupProbe:
httpGet:
port: http
Expand Down
9 changes: 9 additions & 0 deletions k8s/cosec-gateway-reids.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: redis-secret
labels:
app: redis-secret
data:
nodes: NODES
password: PASSWORD

0 comments on commit d0fe56b

Please sign in to comment.