Skip to content

Commit

Permalink
Merge pull request #232 from lappis-unb/update
Browse files Browse the repository at this point in the history
Update rasa version management using .env
  • Loading branch information
arthurTemporim authored Oct 28, 2023
2 parents 72c1438 + cbca709 commit f5493ce
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
- name: Install dependencies
run: |
cd bot/
export $(grep -v '^#' .env | xargs)
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ celerybeat-schedule.*
*.sage.py

# Environments
.env
.venv
venv/
ENV/
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
2 changes: 2 additions & 0 deletions env/bot.env → bot/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ MONGO_HOST=mongo
MONGO_PORT=27017
MONGO_USERNAME=
MONGO_PASSWORD=
RASA_VERSION=3.6.13
RASA_SDK_VERSION=3.6.2
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

1 comment on commit f5493ce

@Daniel-online
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a

Please sign in to comment.