Currently, there are custom commands set in the docker-compose.yml for the rasa-production and rasa-worker container:
command: >
x
--no-prompt
--production
--config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
--port 5005
--jwt-method HS256
--jwt-secret ${JWT_SECRET}
--auth-token '${RASA_TOKEN}'
--cors "*"
Does anyone know how to set these parameters as environment variables and skip them in the command? I’ve rewritten the setup to a ECS task definition (which is working), but I have to pass the variables hardcoded as plain text in the command
, since I cannot refer to environment variables in the ECS task definition container command. This looks like the following:
{
"essential": true,
"image": "registry.hub.docker.com/rasa/rasa:1.10.12-full",
"command": ["x", "--production", "--no-prompt", "--config-endpoint", "http://127.0.0.1:5002/api/config?token=1234", "--port", "5005", "--jwt-method", "HS256", "--jwt-secret", "1234", "--auth-token", "1234", "--cors", "\"*\"", "--debug"],
"name": "rasa-production",
"portMappings": [
{
"containerPort": 5005,
"hostPort": 5005
}
],
...
}
...
I already tried creating an own Dockerfile with the following content, without succes.
FROM rasa/rasa:1.10.12-full
ENV RASA_X_HOST="http://127.0.0.1:5002"
ENV RASA_X_TOKEN=""
ENV JWT_SECRET=""
ENV RASA_TOKEN=""
ENV PORT=5005
ENTRYPOINT rasa x --no-prompt --production --config-endpoint ${RASA_X_HOST}/api/config?token=${RASA_X_TOKEN} --port ${PORT} --jwt-method HS256 --jwt-secret ${JWT_SECRET} --auth-token '${RASA_TOKEN}' --cors \"*\" --debug