Adding port config based on environment variables, removing gradle build for prod deployment
All checks were successful
sample gradle build and test / build (pull_request) Successful in 1m49s
sample gradle build and test / tag (push) Successful in 8s
sample gradle build and test / build_tag_push (push) Successful in 2m27s
Promote image with tag test to prod / tag (push) Successful in 7s
Promote image with tag test to prod / build_tag_push (push) Successful in 23s

This commit is contained in:
hitanshu310 2025-09-21 00:34:20 +05:30
parent c8ba9ef6a9
commit 831aaa41eb
2 changed files with 7 additions and 6 deletions

View File

@ -54,10 +54,10 @@ jobs:
registry: 'http://192.168.0.100:8928' registry: 'http://192.168.0.100:8928'
username: hitanshu username: hitanshu
password: ${{ secrets.TOKEN }} password: ${{ secrets.TOKEN }}
- name: Gradle build - name: Tag prod image
run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} run: |
- name: Tag image as test docker tag 192.168.0.100:8928/hithomelabs/cftunnels:test 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }}
run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} 192.168.0.100:8928/hithomelabs/cftunnels:prod docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} 192.168.0.100:8928/hithomelabs/cftunnels:prod
- name: Push to Gitea Registry - name: Push to Gitea Registry
run: | run: |
docker push 192.168.0.100:8928/hithomelabs/cftunnels:prod docker push 192.168.0.100:8928/hithomelabs/cftunnels:prod

View File

@ -2,6 +2,8 @@ services:
app: app:
image: gitea.hithomelabs.com/hithomelabs/cftunnels:${ENV} image: gitea.hithomelabs.com/hithomelabs/cftunnels:${ENV}
container_name: cftunnels_${ENV} container_name: cftunnels_${ENV}
ports:
- "${HOST_PORT:-5002}:8080
environment: environment:
- CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID} - CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}
- CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY} - CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
@ -9,6 +11,5 @@ services:
- ENV=${ENV} - ENV=${ENV}
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID} - OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET} - OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
ports: - HOST_PORT=${HOST_PORT}
- 5002:8080
restart: unless-stopped restart: unless-stopped