summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/botpress.yml
blob: eafd043c6e7a8b6bc5a1777d47ee57060dfe3a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
captainVersion: 4
services:
    $$cap_appname:
        caproverExtra:
            containerHttpPort: 3000
            dockerfileLines:
                - FROM botpress/server:$$cap_BOTPRESS_VERSION
                - CMD /botpress/bp
        environment:
            DATABASE_URL: postgres://$$cap_POSTGRES_USER:$$cap_POSTGRES_PASSWORD@srv-captain--$$cap_appname-db/$$cap_POSTGRES_DB
            REDIS_URL: redis://srv-captain--$$cap_appname-cache?password=$$cap_REDIS_PASSWORD
            EXTERNAL_URL: http://$$cap_appname.$$cap_root_domain
            BP_MODULE_NLU_DUCKLINGURL: http://srv-captain--$$cap_appname-lang:8000
            BP_MODULE_NLU_LANGUAGESOURCES: '[{"endpoint": "http://srv-captain--$$cap_appname-lang:3100"}]'
            BP_PRODUCTION: $$cap_BOTPRESS_PRODUCTION
            BPFS_STORAGE: $$cap_BOTPRESS_STORAGE
            VERBOSITY_LEVEL: $$cap_BOTPRESS_VERBOSITY_LEVEL
            BP_DECISION_MIN_CONFIDENCE: $$cap_BOTPRESS_DECISION_MIN_CONFIDENCE
            FAST_TEXT_VERBOSITY: $$cap_BOTPRESS_FAST_TEXT_VERBOSITY
            FAST_TEXT_CLEANUP_MS: $$cap_BOTPRESS_FAST_TEXT_CLEANUP_MS
        depends_on:
            - $$cap_appname-lang
            - $$cap_appname-db
            - $$cap_appname-cache
        volumes:
            - $$cap_appname:/botpress/data

    $$cap_appname-lang:
        caproverExtra:
            notExposeAsWebApp: 'true'
            dockerfileLines:
                - FROM botpress/server:$$cap_BOTPRESS_VERSION
                - USER root
                - RUN mkdir /botpress/lang && chown -R botpress:botpress /botpress/lang
                - USER botpress
                - CMD bash -c "./duckling -p 8000 & ./bp lang --langDir /botpress/lang --port 3100"
        volumes:
            - $$cap_appname-lang:/botpress/lang

    $$cap_appname-db:
        caproverExtra:
            notExposeAsWebApp: 'true'
        image: postgres:$$cap_POSTGRES_VERSION
        environment:
            POSTGRES_DB: $$cap_POSTGRES_DB
            POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
            POSTGRES_USER: $$cap_POSTGRES_USER
        volumes:
            - $$cap_appname-db:/var/lib/postgresql/data

    $$cap_appname-cache:
        caproverExtra:
            notExposeAsWebApp: 'true'
            dockerfileLines:
                - FROM redis:$$cap_REDIS_VERSION
                - CMD redis-server --requirepass $$cap_REDIS_PASSWORD
        volumes:
            - $$cap_appname-cache:/data

caproverOneClickApp:
    displayName: Botpress
    isOfficial: true
    description: Open Source Platform For Developers To Build High-Quality Digital Assistants
    documentation: https://botpress.com/docs
    instructions:
        start: |-
            Botpress is a tool to simplify building chat bots for developers.
            The platform puts together the boilerplate code and infrastructure you need to get a chatbot up and running and gives a complete dev-friendly platform that ships with all the tools you need to build, deploy, and manage production-grade chat bots in record time.
        end: |-
            Botpress has been successfully deployed! It might take few moments before it's fully started.

            Please perform the following steps:

            1. Go to the **HTTP Settings** of `$$cap_appname` and **Enable WebSocket Support**
            2. Visit your Botpress instance at `http://$$cap_appname.$$cap_root_domain` and create your account
            3. Go to **Code Editor** and select **Configurations** > **Module Configurations** > `nlu.json` in the side bar
            4. Replace value for `ducklingURL` with `http://srv-captain--$$cap_appname-lang:8000`
            5. Replace value for `languageSources` > `endpoint` with `http://srv-captain--$$cap_appname-lang:3100`
            6. Restart `$$cap_appname` in CapRover by clicking on **Save & Update**

            Have fun with Botpress!
    variables:
        - id: $$cap_BOTPRESS_VERSION
          label: Version | Botpress
          description: Version of Botpress. Check out their Docker page for the valid tags https://hub.docker.com/r/botpress/server/tags
          defaultValue: v12_30_2
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_VERSION
          label: Version | PostgreSQL
          description: Version of PostgreSQL. Check out their Docker page for the valid tags https://hub.docker.com/_/postgres/tags
          defaultValue: 11.2-alpine
          validRegex: /.{1,}/
        - id: $$cap_REDIS_VERSION
          label: Version | Redis
          description: Version of Redis. Check out their Docker page for the valid tags https://hub.docker.com/_/redis/tags
          defaultValue: 5.0.5-alpine
          validRegex: /.{1,}/
        - id: $$cap_BOTPRESS_PRODUCTION
          label: General | Production Mode
          description: Whether to enable production mode.
          defaultValue: 'true'
          validRegex: /^(true|false)$/
        - id: $$cap_BOTPRESS_STORAGE
          label: General | Storage
          description: Storage destination used by BPFS to read and write files (global and bots). Either `disk` or `database`.
          defaultValue: database
          validRegex: /.{1,}/
        - id: $$cap_BOTPRESS_VERBOSITY_LEVEL
          label: General | Verbosity Level
          description: When set higher than `0`, Botpress will be more chatty when processing requests.
          defaultValue: '0'
          validRegex: /.{1,}/
        - id: $$cap_BOTPRESS_DECISION_MIN_CONFIDENCE
          label: General | Decision Minimum Confidence
          description: Minimum threshold required for the Decision Engine to elect a suggestion.
          defaultValue: '0.5'
          validRegex: /.{1,}/
        - id: $$cap_BOTPRESS_FAST_TEXT_VERBOSITY
          label: General | Fast Text Verbosity
          description: Level of verbosity that FastText will use when training models.
          defaultValue: '0'
          validRegex: /.{1,}/
        - id: $$cap_BOTPRESS_FAST_TEXT_CLEANUP_MS
          label: General | Fast Text Clean-Up
          description: Model will be kept in memory until it receives no messages to process for that duration. Defined in milliseconds.
          defaultValue: 60000
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_DB
          label: PostgreSQL | Name
          description: Name of the database.
          defaultValue: botpress
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_USER
          label: PostgreSQL | User
          description: Name of the database user.
          defaultValue: botpress
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_PASSWORD
          label: PostgreSQL | Password
          description: Password of the database user.
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /.{1,}/
        - id: $$cap_REDIS_PASSWORD
          label: Redis | Password
          description: Password for Redis.
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /.{1,}/