Skip to content

Commit

Permalink
Update rasa version management using .env
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Temporim <arthurrtl@gmail.com>
  • Loading branch information
arthurTemporim committed Oct 28, 2023
1 parent 72c1438 commit 5f26f46
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
- name: Install dependencies
run: |
cd bot/
export $(grep -v '^#' .env | xargs)
env
pip install --upgrade pip
pip install flake8 pytest rasa==3.6.12
pip install flake8 pytest rasa==$RASA_VERSION
if [ -f requirements.txt ]; then make install; fi
- name: Lint with flake8
run: |
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
include bot/.env
export $(shell sed 's/=.*//' bot/.env)

current_dir := $(shell pwd)
user := $(shell whoami)

Expand All @@ -23,6 +26,7 @@ logs:
-f

build:
export $(grep -v '^#' env/bot.env | xargs)
docker compose build \
--no-cache bot

Expand Down
3 changes: 3 additions & 0 deletions bot/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.PHONY: all clean actions

include .env
export $(shell sed 's/=.*//' .env)

## FLAGS:
LOG_LEVEL = -vv
RASA_ENDPOINTS = --endpoints
Expand Down
3 changes: 2 additions & 1 deletion bot/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rasa==3.6.12
rasa==${RASA_VERSION}
rasa-model-report==1.5.0
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ services:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
args:
RASA_VERSION: ${RASA_VERSION}
container_name: bot
env_file:
- ./env/bot.env
- ./bot/.env
volumes:
- ./bot/:/bot/
ports:
Expand All @@ -26,7 +28,7 @@ services:
image: mongo:6.0
restart: unless-stopped
env_file:
- env/bot.env
- ./bot/.env
ports:
- 27017:27017
networks:
Expand All @@ -40,9 +42,11 @@ services:
build:
context: .
dockerfile: ./docker/actions.Dockerfile
args:
RASA_SDK_VERSION: ${RASA_SDK_VERSION}
container_name: actions
env_file:
- ./env/bot.env
- ./bot/.env
ports:
- 5055:5055
volumes:
Expand Down
3 changes: 2 additions & 1 deletion docker/actions.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM rasa/rasa-sdk:3.6.2
ARG RASA_SDK_VERSION
FROM rasa/rasa-sdk:${RASA_SDK_VERSION}

WORKDIR /bot
COPY ./bot /bot
Expand Down
3 changes: 2 additions & 1 deletion docker/bot.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM rasa/rasa:3.6.12-full
ARG RASA_VERSION
FROM rasa/rasa:${RASA_VERSION}-full

WORKDIR /bot
COPY ./bot /bot
Expand Down
4 changes: 0 additions & 4 deletions env/bot.env

This file was deleted.

0 comments on commit 5f26f46

Please sign in to comment.