Merge pull request #4 from josedario87/codex/write-gitea-workflow-for-stack-deployment
Some checks failed
Deploy conversation layer / deploy (push) Failing after 1s
Some checks failed
Deploy conversation layer / deploy (push) Failing after 1s
Add Gitea deployment workflow
This commit is contained in:
32
.gitea/workflows/deploy.yml
Normal file
32
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Deploy conversation layer
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Log in to Gitea registry
|
||||||
|
run: echo "${{ secrets.GITEA_REGISTRY_PASSWORD }}" | docker login gitea.interno.com -u ${{ secrets.GITEA_REGISTRY_USER }} --password-stdin
|
||||||
|
- name: Remove old images
|
||||||
|
run: |
|
||||||
|
docker rmi -f gitea.interno.com/nucleo000/conversation-whatsapp-router:latest || true
|
||||||
|
docker rmi -f gitea.interno.com/nucleo000/conversation-chat-ui:latest || true
|
||||||
|
- name: Mirror open-wa image to Gitea
|
||||||
|
run: |
|
||||||
|
docker pull openwa/wa-automate:latest
|
||||||
|
docker tag openwa/wa-automate:latest gitea.interno.com/nucleo000/conversation-openwa:latest
|
||||||
|
docker push gitea.interno.com/nucleo000/conversation-openwa:latest
|
||||||
|
docker rmi openwa/wa-automate:latest
|
||||||
|
- name: Build and push stack images
|
||||||
|
run: |
|
||||||
|
docker compose -p conversation-layer build
|
||||||
|
docker compose -p conversation-layer push
|
||||||
|
- name: Deploy stack
|
||||||
|
run: |
|
||||||
|
docker compose -p conversation-layer pull
|
||||||
|
docker compose -p conversation-layer up -d --remove-orphans
|
||||||
10
Makefile
Normal file
10
Makefile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
.PHONY: sync-from-github sync-to-github
|
||||||
|
|
||||||
|
# Pull latest changes from the GitHub mirror and push them to Gitea
|
||||||
|
sync-from-github:
|
||||||
|
git pull github main
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
# Push local changes to the GitHub mirror
|
||||||
|
sync-to-github:
|
||||||
|
git push github main
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
services:
|
services:
|
||||||
openwa:
|
openwa:
|
||||||
image: openwa/wa-automate
|
image: gitea.interno.com/nucleo000/conversation-openwa:latest
|
||||||
|
container_name: conversation-openwa
|
||||||
environment:
|
environment:
|
||||||
- WEBHOOK_URL=http://whatsapp-router:3001/webhook
|
- WEBHOOK_URL=http://whatsapp-router:3001/webhook
|
||||||
- PORT=8080
|
- PORT=8080
|
||||||
@@ -13,6 +14,8 @@ services:
|
|||||||
|
|
||||||
whatsapp-router:
|
whatsapp-router:
|
||||||
build: ./whatsapp-router
|
build: ./whatsapp-router
|
||||||
|
image: gitea.interno.com/nucleo000/conversation-whatsapp-router:latest
|
||||||
|
container_name: conversation-whatsapp-router
|
||||||
environment:
|
environment:
|
||||||
- LLM_AGENT_URL=http://llm-agent:8000
|
- LLM_AGENT_URL=http://llm-agent:8000
|
||||||
- OPEN_WA_URL=http://openwa:8080
|
- OPEN_WA_URL=http://openwa:8080
|
||||||
@@ -21,6 +24,8 @@ services:
|
|||||||
|
|
||||||
chat-ui:
|
chat-ui:
|
||||||
build: ./chat-ui
|
build: ./chat-ui
|
||||||
|
image: gitea.interno.com/nucleo000/conversation-chat-ui:latest
|
||||||
|
container_name: conversation-chat-ui
|
||||||
environment:
|
environment:
|
||||||
- LLM_AGENT_URL=http://llm-agent:8000
|
- LLM_AGENT_URL=http://llm-agent:8000
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user