diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 44bb7a7..1782624 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,86 +1,86 @@ -name: Go Linter +# name: Go Linter -on: - pull_request: - branches: - - master - push: - branches: - - master +# on: +# pull_request: +# branches: +# - master +# push: +# branches: +# - master -jobs: - lint: - name: Run golangci-lint - runs-on: ubuntu-22.04 +# jobs: +# lint: +# name: Run golangci-lint +# runs-on: ubuntu-22.04 - strategy: - matrix: - project: - - api_gateway +# strategy: +# matrix: +# project: +# - api_gateway - steps: - - name: Checkout repository - uses: actions/checkout@v3 +# steps: +# - name: Checkout repository +# uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23 +# - name: Set up Go +# uses: actions/setup-go@v4 +# with: +# go-version: 1.23 - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.62.2 +# - name: Install golangci-lint +# run: | +# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.62.2 - - name: Run golangci-lint - run: | - go mod tidy - golangci-lint run -c ./.golangci-lint.yaml --fix=false --color=always +# - name: Run golangci-lint +# run: | +# go mod tidy +# golangci-lint run -c ./.golangci-lint.yaml --fix=false --color=always - build: - name: Build golang services - runs-on: ubuntu-22.04 - needs: lint +# build: +# name: Build golang services +# runs-on: ubuntu-22.04 +# needs: lint - strategy: - matrix: - project: - - api_gateway +# strategy: +# matrix: +# project: +# - api_gateway - steps: - - name: Checkout repository - uses: actions/checkout@v3 +# steps: +# - name: Checkout repository +# uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.23 +# - name: Set up Go +# uses: actions/setup-go@v4 +# with: +# go-version: 1.23 - - name: Build golang services - run: | - go mod tidy - CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main cmd/main.go +# - name: Build golang services +# run: | +# go mod tidy +# CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main cmd/main.go - push: - name: Push Docker Images - runs-on: ubuntu-22.04 - needs: lint - if: gitea.ref == 'refs/heads/master' +# push: +# name: Push Docker Images +# runs-on: ubuntu-22.04 +# needs: lint +# if: gitea.ref == 'refs/heads/master' - strategy: - matrix: - project: - - api_gateway +# strategy: +# matrix: +# project: +# - api_gateway - steps: - - name: Checkout репозитория - uses: actions/checkout@v4 +# steps: +# - name: Checkout репозитория +# uses: actions/checkout@v4 - - name: Build and Push - env: - SECDIST_CONFIG: ${{ secrets.FMT_CRM_SECDIST_CONFIG }} - run: | - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - IMAGE_NAME="molvaapp/${{ matrix.project }}" - TAG="latest" - docker build -t $IMAGE_NAME:$TAG . - docker push $IMAGE_NAME:$TAG \ No newline at end of file +# - name: Build and Push +# env: +# SECDIST_CONFIG: ${{ secrets.FMT_CRM_SECDIST_CONFIG }} +# run: | +# echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin +# IMAGE_NAME="molvaapp/${{ matrix.project }}" +# TAG="latest" +# docker build -t $IMAGE_NAME:$TAG . +# docker push $IMAGE_NAME:$TAG \ No newline at end of file diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 94ea9d9..f1dbfe8 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -85,8 +85,10 @@ jobs: if [ "${{ inputs.version }}" == "latest" ]; then TAG=${{ steps.git-metadata.outputs.GIT_TAG != "none" && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }} IMAGE_NAME="molvaapp/${{ matrix.project }}" + docker build -t $IMAGE_NAME:$TAG . docker push $IMAGE_NAME:$TAG + echo "Pushed image $IMAGE_NAME:$TAG" else echo "Using non-latest version ${{ inputs.version }}" echo "Skipping pushing image..." diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f30697b --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +.DS_Store + +Thumbs.db +desktop.ini + +.vscode/ +.idea/ +*.sublime-workspace +*.sublime-project +go.sum +*.log +*.tmp +*.swp + +/bin/ +/pkg/ +/coverage.out +*.test +*.exe +*.dll +*.so +*.dylib +vendor/ + +*.o +*.obj +*.a +*.lib +*.out +*.class +*.pch + +docker-compose.yaml +.env + +dist/ +tmp/ +.vscod/ + +code-quality-repot.json + +molva + +test.sh + +bin/ +code-quality-report.json +.build/config/local.yaml \ No newline at end of file diff --git a/docker-compose.staging.yaml b/docker-compose.staging.yaml index a96f126..9828f4a 100644 --- a/docker-compose.staging.yaml +++ b/docker-compose.staging.yaml @@ -37,15 +37,6 @@ services: preferences: - spread: node.labels.TZ - molva-notifications: - image: molvaapp/notification:latest - container_name: molva-notifications - restart: unless-stopped - volumes: - - /opt/molva:/opt/molva - networks: - - molva - networks: molva: external: true \ No newline at end of file