| version: '3.8' | |
| services: | |
| nginx: | |
| image: nginx:latest | |
| container_name: "rasa-nginx" | |
| restart: "always" | |
| ports: | |
| - "80:80" | |
| volumes: | |
| - "../nginx/index.html:/usr/share/nginx/html/index.html" | |
| - "../nginx/default.conf:/etc/nginx/conf.d/default.conf" | |
| networks: | |
| - rasa-network | |
| rasa: | |
| image: rasa_custom:2.0 | |
| build: | |
| context: "../app" | |
| container_name: "rasa" | |
| restart: "always" | |
| ports: | |
| - "5005:5005" | |
| volumes: | |
| - "../app/data:/app/data" | |
| - "../app/models:/app/models" | |
| - "../app/credentials.yml:/app/credentials.yml" | |
| - "../app/endpoints.yml:/app/endpoints.yml" | |
| - "../app/domain.yml:/app/domain.yml" | |
| - "../app/configs:/app/config" | |
| environment: | |
| DB_HOST: db | |
| DB_PORT: "5432" # Replace with your PostgreSQL port | |
| DB_USER: admin # Replace with your PostgreSQL username | |
| DB_PASSWORD: admin # Replace with your PostgreSQL password | |
| DB_DATABASE: rasa # Replace with your PostgreSQL database name | |
| depends_on: | |
| - db | |
| networks: | |
| - rasa-network | |
| action_server: | |
| image: rasa_action:2.0 | |
| build: | |
| context: "../app/actions" | |
| container_name: "rasa-actions" | |
| restart: "always" | |
| ports: | |
| - "5055:5055" | |
| volumes: | |
| - "../app/actions:/app/actions" | |
| networks: | |
| - rasa-network | |
| db: | |
| restart: always | |
| image: "postgres:latest" # Use the latest PostgreSQL image | |
| ports: | |
| - "5432:5432" | |
| environment: | |
| POSTGRES_USER: "admin" # Set your desired username | |
| POSTGRES_PASSWORD: "admin" # Set your desired password | |
| POSTGRES_DB: "rasa" # Set your desired database name | |
| volumes: | |
| - ./db:/var/lib/postgresql/data # Persist data outside the container | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U admin"] | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| networks: | |
| rasa-network: | |
| driver: bridge | |