Italosayan
(Italo sayan)
December 23, 2021, 3:59pm
1
I have followed all the steps in the steps in CH.11 of the rasa ebook:
The Rasa Masterclass Handbook: Episode 11 | The Rasa Blog | Rasa
Also I chmod my keys following the recommendations in this discussion. How to install SSL certificate for RASA X?
sudo chmod 640 certs/privkey.pem.
However, I’m still not able to access my rasa server through https. Now I’m going on the route of purchasing an ssl. How do I install an external ssl in rasa?
Also tried this:
indeed that was it.
i was specifying the wrong location, forgot that when you run docker-compose up -d command docker mounts certs folder in container according to what we wrote in docker-compose.yml as configuration in the nginx part. so instead of specifying the /etc/certs/fullchain.pem (the one in the container) i was referencing my /etc/rasa/bot_support/certs/fullchain.pem
Last question !! the certificate work only with mozilla ??? @justyn
And this:
https://issueexplorer.com/issue/RasaHQ/rasa/10292
M_R_LY
(Majnun Jaahil🌪™)
December 24, 2021, 9:46am
2
hello can you please share your files configuration for more details ?
Italosayan
(Italo sayan)
December 24, 2021, 9:47am
3
Which files are you interested in?
M_R_LY
(Majnun Jaahil🌪™)
December 24, 2021, 9:49am
4
/etc/certs/fullchain.pem
(the one in the container)
/etc/rasa/bot_support/certs/fullchain.pem
or where you put your certiicate also if youre using doxker compose the docker-compose file
did you manage to acces the rasa x throught the browser ?
Italosayan
(Italo sayan)
December 24, 2021, 10:38am
5
Yes, I can access but only via http.
The certs are inside /etc/rasa/certs
version: "3.4"
x-database-credentials: &database-credentials
DB_HOST: "db"
DB_PORT: "5432"
DB_USER: "${DB_USER:-admin}"
DB_PASSWORD: "${DB_PASSWORD}"
DB_LOGIN_DB: "${DB_LOGIN_DB:-rasa}"
x-rabbitmq-credentials: &rabbitmq-credentials
RABBITMQ_HOST: "rabbit"
RABBITMQ_USERNAME: "user"
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
x-redis-credentials: &redis-credentials
REDIS_HOST: "redis"
REDIS_PORT: "6379"
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB: "1"
REDIS_CACHE_DB: "2"
ACCEPTABLE_QUERY_COUNT_NUMBER: "50000"
x-duckling-credentials: &duckling-credentials
RASA_DUCKLING_HTTP_URL: "http://duckling:8000"
x-nginx-host-variables: &nginx-host-variables
RASA_X_HOST: "rasa-x:5002"
RASA_USER_APP: "app:5055"
RASA_PRODUCTION_HOST: "rasa-production:5005"
x-rasax-credentials: &rasax-credentials
RASA_X_HOST: "http://rasa-x:5002"
RASA_X_USERNAME: ${RASA_X_USERNAME:-admin}
RASA_X_PASSWORD: ${RASA_X_PASSWORD:-}
RASA_X_TOKEN: ${RASA_X_TOKEN}
JWT_SECRET: ${JWT_SECRET}
RASA_USER_APP: "http://app:5055"
RASA_PRODUCTION_HOST: "http://rasa-production:5005"
RASA_WORKER_HOST: "http://rasa-worker:5005"
RASA_TOKEN: ${RASA_TOKEN}
x-rasa-credentials: &rasa-credentials
<<: *rabbitmq-credentials
<<: *rasax-credentials
<<: *database-credentials
<<: *redis-credentials
<<: *duckling-credentials
RASA_TOKEN: ${RASA_TOKEN}
RASA_MODEL_PULL_INTERVAL: 10
RABBITMQ_QUEUE: "rasa_production_events"
RASA_TELEMETRY_ENABLED: ${RASA_TELEMETRY_ENABLED:-true}
x-rasa-services: &default-rasa-service
restart: always
image: "rasa/rasa:${RASA_VERSION}-full"
volumes:
- ./.config:/.config
expose:
- "5005"
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 "*"
depends_on:
- rasa-x
- rabbit
- redis
services:
rasa-x:
restart: always
image: "rasa/rasa-x:${RASA_X_VERSION}"
expose:
- "5002"
volumes:
- ./models:/app/models
- ./environments.yml:/app/environments.yml
- ./credentials.yml:/app/credentials.yml
- ./endpoints.yml:/app/endpoints.yml
- ./logs:/logs
- ./auth:/app/auth
environment:
<<: *database-credentials
<<: *rasa-credentials
SELF_PORT: "5002"
DB_DATABASE: "${DB_DATABASE:-rasa}"
RASA_MODEL_DIR: "/app/models"
PASSWORD_SALT: ${PASSWORD_SALT}
RABBITMQ_QUEUE: "rasa_production_events"
RASA_X_USER_ANALYTICS: "0"
SANIC_RESPONSE_TIMEOUT: "3600"
RUN_DATABASE_MIGRATION_AS_SEPARATE_SERVICE: "true"
depends_on:
- db
db-migration:
entrypoint: ["python"]
command: ["-m", "rasax.community.services.db_migration_service"]
restart: always
image: "rasa/rasa-x:${RASA_X_VERSION}"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || kill 1"]
interval: 5s
timeout: 1s
retries: 3
start_period: 2s
expose:
- "8000"
environment:
<<: *database-credentials
RUN_DATABASE_MIGRATION_AS_SEPARATE_SERVICE: "true"
MPLCONFIGDIR: "/tmp/.matplotlib"
depends_on:
- db
rasa-production:
<<: *default-rasa-service
environment:
<<: *rasa-credentials
RASA_ENVIRONMENT: "production"
DB_DATABASE: "tracker"
MPLCONFIGDIR: "/tmp/.matplotlib"
RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
rasa-worker:
<<: *default-rasa-service
environment:
<<: *rasa-credentials
RASA_ENVIRONMENT: "worker"
DB_DATABASE: "worker_tracker"
MPLCONFIGDIR: "/tmp/.matplotlib"
RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
app:
restart: always
image: "rasa/rasa-x-demo:${RASA_X_DEMO_VERSION}"
expose:
- "5055"
depends_on:
- rasa-production
db:
restart: always
image: "bitnami/postgresql:11.11.0"
expose:
- "5432"
environment:
POSTGRESQL_USERNAME: "${DB_USER:-admin}"
POSTGRESQL_PASSWORD: "${DB_PASSWORD}"
POSTGRESQL_DATABASE: "${DB_DATABASE:-rasa}"
volumes:
- ./db:/bitnami/postgresql
rabbit:
restart: always
image: "bitnami/rabbitmq:3.8.17"
environment:
RABBITMQ_HOST: "rabbit"
RABBITMQ_USERNAME: "user"
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
RABBITMQ_DISK_FREE_RELATIVE_LIMIT: "0.1"
expose:
- "5672"
duckling:
restart: always
image: "rasa/duckling:0.1.6.5-r2"
expose:
- "8000"
command: ["duckling-example-exe", "--no-access-log", "--no-error-log"]
nginx:
restart: always
image: "nginx:1.19"
ports:
- "80:8080"
- "441:8443"
volumes:
- ./certs:/etc/certs
- ./nginx-config-files/nginx.conf:/etc/nginx/nginx.conf
- ./nginx-config-files/ssl.conf.template:/etc/nginx/templates/ssl.conf.template
- ./nginx-config-files/rasax.nginx.template:/etc/nginx/templates/rasax.nginx.template
environment:
<<: *nginx-host-variables
depends_on:
- rasa-x
- rasa-production
- app
redis:
restart: always
image: "bitnami/redis:6.2.4"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
expose:
- "6379"
M_R_LY
(Majnun Jaahil🌪™)
December 24, 2021, 10:54am
6
by default the available ports are 443 or 8443 for https can you try to change that?
i saw a 441 in your docker-compose file
also how did you create your certificate annd can i see the nginx-config-files/rasax.nginx.template
and nginx-config-files/ssl.conf.template
also did you try this ?
Uncomment the line include /etc/nginx/conf.d/ssl.conf;
in nginx-config-files/rasax.nginx.template
Uncomment the lines in nginx-config-files/ssl.conf.template
AND adjust them to change the paths /etc/nginx/certs/{fullchain,privkey}.pem
to /etc/certs/{fullchain,privkey}.pem
.
Italosayan
(Italo sayan)
December 24, 2021, 10:56am
7
@M_R_LY you are the boss. thanks!
1 Like
M_R_LY
(Majnun Jaahil🌪™)
December 24, 2021, 11:34am
8
1 Like
Italosayan
(Italo sayan)
December 24, 2021, 12:24pm
9
not really but I’ll revisit this once I know more about rasa