ci prod
This commit is contained in:
parent
f32f55d775
commit
cb2df810ed
26
.gitea/workflows/deployProd.yml
Normal file
26
.gitea/workflows/deployProd.yml
Normal file
@ -0,0 +1,26 @@
|
||||
name: Deploy
|
||||
run-name: ${{ gitea.actor }} build image and push to container registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
CreateImage:
|
||||
runs-on: [squizstaging]
|
||||
uses: https://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
||||
with:
|
||||
runner: hubstaging
|
||||
secrets:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
DeployService:
|
||||
runs-on: [squizprod]
|
||||
needs: CreateImage
|
||||
uses: https://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.4-p7
|
||||
with:
|
||||
runner: hubprod
|
||||
actionid: ${{ gitea.run_id }}
|
||||
|
||||
|
26
.gitea/workflows/deployStaging.yml
Normal file
26
.gitea/workflows/deployStaging.yml
Normal file
@ -0,0 +1,26 @@
|
||||
name: Deploy
|
||||
run-name: ${{ gitea.actor }} build image and push to container registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'staging'
|
||||
|
||||
jobs:
|
||||
CreateImage:
|
||||
runs-on: [hubstaging]
|
||||
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
||||
with:
|
||||
runner: hubstaging
|
||||
secrets:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
DeployService:
|
||||
runs-on: [hubstaging]
|
||||
needs: CreateImage
|
||||
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.4-p7
|
||||
with:
|
||||
runner: hubstaging
|
||||
actionid: ${{ gitea.run_id }}
|
||||
|
||||
|
14
.gitea/workflows/lint.yml
Normal file
14
.gitea/workflows/lint.yml
Normal file
@ -0,0 +1,14 @@
|
||||
name: Lint
|
||||
run-name: ${{ gitea.actor }} produce linting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
|
||||
jobs:
|
||||
Lint:
|
||||
runs-on: [hubstaging]
|
||||
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/lint.yml@v1.1.0
|
||||
with:
|
||||
runner: hubstaging
|
10
Dockerfile
10
Dockerfile
@ -1,15 +1,9 @@
|
||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/golang as build
|
||||
FROM gitea.pena/penadevops/container-images/golang:main as build
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN apk add git
|
||||
ENV GOPRIVATE=penahub.gitlab.yandexcloud.net/backend/penahub_common
|
||||
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
|
||||
RUN go mod download
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o wrkr ./main.go
|
||||
|
||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/alpine as prod
|
||||
FROM gitea.pena/penadevops/container-images/alpine:main as prod
|
||||
COPY --from=build /app/wrkr .
|
||||
ENV IS_PROD_LOG=false
|
||||
ENV IS_PROD=false
|
||||
ENV PG_CRED="host=postgres port=5432 user=squiz password=Redalert2 dbname=squiz sslmode=disable"
|
||||
CMD ["/wrkr"]
|
||||
|
@ -1,20 +1,17 @@
|
||||
version: "3"
|
||||
services:
|
||||
workerv1.0.0:
|
||||
hostname: squiz-workerv1.0.0
|
||||
container_name: squiz-workerv1.0.0
|
||||
image: $CI_REGISTRY_IMAGE/main-worker:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
|
||||
image: gitea.pena/squiz/worker/main:$GITHUB_RUN_NUMBER
|
||||
tty: true
|
||||
environment:
|
||||
IS_PROD_LOG: 'false'
|
||||
IS_PROD: 'false'
|
||||
PG_CRED: 'host=10.8.0.9 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable'
|
||||
KAFKA_BROKER: '10.8.0.8:9092'
|
||||
PG_CRED: 'host=10.8.0.12 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable'
|
||||
KAFKA_BROKER: '10.8.0.226:9092'
|
||||
KAFKA_TOPIC: 'tariffs'
|
||||
QUIZ_ID: quizCnt
|
||||
AMOUNT: 10
|
||||
UNLIM_ID: quizUnlimTime
|
||||
REDIS_HOST: '10.8.0.9:6379'
|
||||
REDIS_HOST: '10.8.0.12:6379'
|
||||
REDIS_PASSWORD: 'Redalert2'
|
||||
REDIS_DB: 2
|
||||
SMTP_API_URL: 'https://api.smtp.bz/v1/smtp/send'
|
||||
@ -24,7 +21,7 @@ services:
|
||||
SMTP_PASS: 'AyMfwqA9LkQH'
|
||||
SMTP_API_KEY: '8tv2xcsfCMBX3TCQxzgeeEwAEYyQrPUp0ggw'
|
||||
SMTP_SENDER: 'quiz@pena.digital'
|
||||
CUSTOMER_SERVICE_ADDRESS: 'http://10.8.0.8:9066/'
|
||||
CUSTOMER_SERVICE_ADDRESS: 'http://10.8.0.226:9066/'
|
||||
MINIO_EP: s3.timeweb.cloud
|
||||
MINIO_AK: 5CV77KVDUU9H0II9R24M
|
||||
MINIO_SK: 0W0m8DyvdAKRJnsAy6mB5zndQ7RouJBLhqhtThcu
|
||||
|
Loading…
Reference in New Issue
Block a user