ci prod
This commit is contained in:
parent
59e5b723ad
commit
82b5c6d9e1
47
.gitea/workflows/deployPrd.yml
Normal file
47
.gitea/workflows/deployPrd.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Deploy
|
||||||
|
run-name: ${{ gitea.actor }} build image and push to container registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Validate:
|
||||||
|
# runs-on: [hubstaging]
|
||||||
|
# steps:
|
||||||
|
# - name: Check out repository code
|
||||||
|
# uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1
|
||||||
|
#
|
||||||
|
# - name: Setup Go
|
||||||
|
# uses: actions/setup-go@v3
|
||||||
|
# with:
|
||||||
|
# go-version: '1.23'
|
||||||
|
#
|
||||||
|
# - name: Run Validator
|
||||||
|
# run: |
|
||||||
|
# cd cmd/validator
|
||||||
|
# go build -o validator .
|
||||||
|
# ./validator
|
||||||
|
# # ошибка если возникла то прервать пайплайн
|
||||||
|
# env:
|
||||||
|
# MONGO_HOST: ${{ secrets.BB_MONGO_URI }}
|
||||||
|
CreateImage:
|
||||||
|
runs-on: [hubstaging]
|
||||||
|
# needs: Validate
|
||||||
|
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.4-p7
|
||||||
|
with:
|
||||||
|
runner: hubstaging
|
||||||
|
secrets:
|
||||||
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
DeployService:
|
||||||
|
runs-on: [hubprod]
|
||||||
|
# needs: [Validate,CreateImage]
|
||||||
|
needs: [CreateImage]
|
||||||
|
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.3
|
||||||
|
with:
|
||||||
|
runner: hubprod
|
||||||
|
actionid: ${{ gitea.run_id }}
|
||||||
|
|
||||||
|
|
@ -4,7 +4,6 @@ run-name: ${{ gitea.actor }} build image and push to container registry
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
|
||||||
- 'staging'
|
- 'staging'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
@ -1,32 +1,28 @@
|
|||||||
services:
|
services:
|
||||||
heruvym:
|
heruvym:
|
||||||
container_name: heruvym
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: $CI_REGISTRY_IMAGE/main:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
|
image: gitea.pena/penaside/heruvym/main:$GITHUB_RUN_NUMBER
|
||||||
ports:
|
ports:
|
||||||
- 10.8.0.8:1488:1488
|
- 10.8.0.226:1487:3000
|
||||||
networks:
|
- 10.8.0.226:2345:2345
|
||||||
- backend_external
|
|
||||||
- default
|
|
||||||
hostname: heruvym
|
|
||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
- BB_PORT=1488
|
HTTP_PORT: 3000
|
||||||
- BB_IS_PROD=true
|
HTTP_HOST: 0.0.0.0
|
||||||
- BB_MINIO_AK=$BB_MINIO_AK
|
BB_IS_PROD: true
|
||||||
- BB_MINIO_EP=$BB_MINIO_EP
|
BB_MINIO_AK: 5CV77KVDUU9H0II9R24M
|
||||||
- BB_MINIO_SK=$BB_MINIO_SK
|
BB_MINIO_EP: s3.timeweb.cloud
|
||||||
- BB_MONGO_URI=$BB_MONGO_URI
|
BB_MINIO_SK: 0W0m8DyvdAKRJnsAy6mB5zndQ7RouJBLhqhtThcu
|
||||||
- S3_REGION=$S3_REGION
|
MONGO_HOST: localhost
|
||||||
- JWT_SECRET=$JWT_SECRET
|
MONGO_PORT: 27017
|
||||||
- BB_MONGO_URI=mongodb://$MONGO_USER:$MONGO_PASSWORD@10.8.0.8:27017/?authSource=support
|
MONGO_USER: support
|
||||||
- TELEGRAM_TOKEN=6414077478:AAFk03HezovLT2kO_i9OYswH8Weirsgp9GU
|
MONGO_PASSWORD: 54143ffdd9304865586e5cf2
|
||||||
- TELEGRAM_CHAT_ID=1001802261459
|
MONGO_DB: support
|
||||||
- REDIS_HOST=10.8.0.9:6379
|
BB_MONGO_URI: "mongodb://support:54143ffdd9304865586e5cf2@localhost:27017/?authSource=support"
|
||||||
- REDIS_PASSWORD=Redalert2
|
TELEGRAM_TOKEN: "6414077478:AAFk03HezovLT2kO_i9OYswH8Weirsgp9GU"
|
||||||
- REDIS_DB=4
|
TELEGRAM_CHAT_ID: -1001802261459
|
||||||
networks:
|
S3_REGION: ru-1
|
||||||
backend_external:
|
JWT_SECRET: "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCLW1tlHyKC9AG0hGpmkksET2DE\nr7ojSPemxFWAgFgcPJWQ7x3uNbsdJ3bIZFoA/FClaWKMCZmjnH9tv0bKZtY/CDhM\nZEyHpMruRSn6IKrxjtQZWy4uv/w6MzUeyBYG0OvNCiYpdvz5SkAGAUHD5ZNFqn2w\nKKFD0I2Dr59BFVSGJwIDAQAB\n-----END PUBLIC KEY-----"
|
||||||
driver: bridge
|
REDIS_HOST: 10.8.9.226:6379
|
||||||
attachable: true
|
REDIS_PASSWORD: Redalert2
|
||||||
internal: true
|
REDIS_DB: 4
|
||||||
|
Loading…
Reference in New Issue
Block a user