Skip to content

Commit f5493ce

Browse files
Merge pull request #232 from lappis-unb/update
Update rasa version management using .env
2 parents 72c1438 + cbca709 commit f5493ce

9 files changed

+24
-8
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
cd bot/
28+
export $(grep -v '^#' .env | xargs)
2829
pip install --upgrade pip
29-
pip install flake8 pytest rasa==3.6.12
30+
pip install flake8 pytest rasa==$RASA_VERSION
3031
if [ -f requirements.txt ]; then make install; fi
3132
- name: Lint with flake8
3233
run: |

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ celerybeat-schedule.*
162162
*.sage.py
163163

164164
# Environments
165-
.env
166165
.venv
167166
venv/
168167
ENV/

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
include bot/.env
2+
export $(shell sed 's/=.*//' bot/.env)
3+
14
current_dir := $(shell pwd)
25
user := $(shell whoami)
36

@@ -23,6 +26,7 @@ logs:
2326
-f
2427

2528
build:
29+
export $(grep -v '^#' env/bot.env | xargs)
2630
docker compose build \
2731
--no-cache bot
2832

env/bot.env bot/.env

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ MONGO_HOST=mongo
22
MONGO_PORT=27017
33
MONGO_USERNAME=
44
MONGO_PASSWORD=
5+
RASA_VERSION=3.6.13
6+
RASA_SDK_VERSION=3.6.2

bot/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.PHONY: all clean actions
22

3+
include .env
4+
export $(shell sed 's/=.*//' .env)
5+
36
## FLAGS:
47
LOG_LEVEL = -vv
58
RASA_ENDPOINTS = --endpoints

bot/requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
rasa==3.6.12
1+
rasa==${RASA_VERSION}
2+
rasa-model-report==1.5.0

docker-compose.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ services:
77
build:
88
context: .
99
dockerfile: ./docker/bot.Dockerfile
10+
args:
11+
RASA_VERSION: ${RASA_VERSION}
1012
container_name: bot
1113
env_file:
12-
- ./env/bot.env
14+
- ./bot/.env
1315
volumes:
1416
- ./bot/:/bot/
1517
ports:
@@ -26,7 +28,7 @@ services:
2628
image: mongo:6.0
2729
restart: unless-stopped
2830
env_file:
29-
- env/bot.env
31+
- ./bot/.env
3032
ports:
3133
- 27017:27017
3234
networks:
@@ -40,9 +42,11 @@ services:
4042
build:
4143
context: .
4244
dockerfile: ./docker/actions.Dockerfile
45+
args:
46+
RASA_SDK_VERSION: ${RASA_SDK_VERSION}
4347
container_name: actions
4448
env_file:
45-
- ./env/bot.env
49+
- ./bot/.env
4650
ports:
4751
- 5055:5055
4852
volumes:

docker/actions.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM rasa/rasa-sdk:3.6.2
1+
ARG RASA_SDK_VERSION
2+
FROM rasa/rasa-sdk:${RASA_SDK_VERSION}
23

34
WORKDIR /bot
45
COPY ./bot /bot

docker/bot.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM rasa/rasa:3.6.12-full
1+
ARG RASA_VERSION
2+
FROM rasa/rasa:${RASA_VERSION}-full
23

34
WORKDIR /bot
45
COPY ./bot /bot

0 commit comments

Comments
 (0)