-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from sireto/feature/supportTemplate
Feature/support template
- Loading branch information
Showing
226 changed files
with
9,656 additions
and
1,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Docker Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build_on_push: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
service: | ||
- autonomous-agent-manager | ||
- autonomous-agents-api | ||
- autonomous-agent | ||
- autonomous-agent-frontend | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ vars.DOCKER_REGISTRY_HOST }} | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_SECRET }} | ||
|
||
- name: Build and push Docker image | ||
id: docker_build | ||
env: | ||
SERVICE_NAME: ${{ matrix.service }} | ||
run: | | ||
REPO_NAME="${GITHUB_REPOSITORY##*/}" | ||
COMMON_TAG="${{ github.ref_name }}" | ||
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | ||
COMMON_TAG="latest" | ||
fi | ||
IMAGE_NAME="${{ vars.DOCKER_REGISTRY_HOST }}/${REPO_NAME}/${SERVICE_NAME}" | ||
docker build -t "$IMAGE_NAME:${{ github.sha }}" -t "$IMAGE_NAME:$COMMON_TAG" ${SERVICE_NAME} | ||
docker push "$IMAGE_NAME:${{ github.sha }}" | ||
docker push "$IMAGE_NAME:$COMMON_TAG" | ||
deploy_services: | ||
needs: build_on_push | ||
strategy: | ||
matrix: | ||
service: | ||
- autonomous-agent-manager | ||
- autonomous-agents-api | ||
- autonomous-agent | ||
max-parallel: 1 | ||
|
||
runs-on: self-hosted | ||
env: | ||
SERVICE_NAME: ${{ matrix.service }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
|
||
steps: | ||
- name: Deploy built image | ||
id: docker_deploy | ||
run: | | ||
REPO_NAME="${GITHUB_REPOSITORY##*/}" | ||
IMAGE_NAME="${{ vars.DOCKER_REGISTRY_HOST }}/${REPO_NAME}/${SERVICE_NAME}" | ||
DEPLOY_TAG="${{ github.sha }}" | ||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then | ||
DOCKER_HOST="${{ vars.PROD_HOST }}" | ||
DOCKER_STACK="${REPO_NAME}" | ||
DEPLOY_TAG="${{ github.ref_name }}" | ||
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then | ||
DOCKER_HOST="${{ vars.DEV_HOST }}" | ||
DOCKER_STACK="${{ vars.DEV_STACK }}" | ||
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | ||
DOCKER_HOST="${{ vars.STAGING_HOST }}" | ||
DOCKER_STACK="${REPO_NAME}_staging" | ||
fi | ||
docker --host "$DOCKER_HOST" service update --image $IMAGE_NAME:$DEPLOY_TAG ${DOCKER_STACK}_${SERVICE_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
Cardano Autonomous Agent Monorepo | ||
============ | ||
|
||
1. [Backend](./autonomous_agent_api/) | ||
2. [Frontend](./automonous_agent_frontend/) | ||
1. [Backend](autonomous-agents-api/) | ||
2. [Agent Manager](autonomous-agent-manager/) | ||
3. [Agent](autonomous-agent/) | ||
4. [Frontend](./automonous_agent_frontend/) | ||
|
||
Python version : 3.12.2 | ||
|
||
|
||
- docker-compose.local - ( Docker Container for Postgres database and pgadmin4 ) | ||
Python version : 3.12.2 | ||
|
||
- For Backend setup refer to autonomous_agent_api/readme guide. | ||
- docker-compose.local - ( Docker Container for Postgres database,kafka, pgadmin4 ) | ||
|
||
- For further Setup details go to each directory's READ ME docs.... |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Use Node.js base image with a specific version (you can change this as needed) | ||
FROM node:18-alpine | ||
|
||
# Set working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and yarn.lock to the container | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies | ||
RUN yarn install --frozen-lockfile --production | ||
|
||
# Copy the rest of the application code to the container | ||
COPY . . | ||
|
||
RUN yarn prisma generate | ||
# Expose the port the app runs on (if applicable) | ||
EXPOSE 3001 | ||
|
||
# Command to run the application | ||
CMD ["yarn", "start"] |
Oops, something went wrong.