Hey guys, I’m trying to start a simple docker-compose with a sdk server, nlu server and a postgres server.
My docker-compose.yml:
version: '3'
services:
rasa_nlu:
restart: always
image: acqua:v1
depends_on:
- postgresql
expose:
- 5005
ports:
- "5005:5005"
volumes:
- "/home/initiate/codigos/acqua_madre/jo_minimum:/rasa"
- /home/initiate/codigos/acqua_madre/database:/var/lib/postgresql/data
command: "rasa run --enable-api --cors '*' --endpoints endpoints.yml"
rasa_actions:
depends_on:
- rasa_nlu
restart: always
image: acqua:v1
expose:
- 5055
volumes:
- "/home/initiate/codigos/acqua_madre/jo_minimum:/rasa"
command: "rasa run actions"
postgresql:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: "rasa"
POSTGRES_USER: "rasa"
PostGRES_DB: "/var/lib/postgresql/data/rasa.db"
volumes:
#- "/home/initiate/codigos/acqua_madre/jo_minimum/rasa.db:/var/lib/postgresql/rasa.db"
- /home/initiate/codigos/acqua_madre/database:/var/lib/postgresql/data
expose:
- 5432
My endpoints.yml:
action_endpoint:
url: "http://rasa_actions:5055/webhook"
# Tracker store which is used to store the conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/tracker-stores
tracker_store:
type: SQL
dialect: "postgresql" # the dialect used to interact with the db
url: "postgresql" # (optional) host of the sql db, e.g. "localhost"
port: "5432"
login_db: "rasa"
db: "/var/lib/postgresql/rasa.db" # path to your db
username: rasa # username used for authentication
password: rasa # password used for authentication
query: # optional dictionary to be added as a query string to the connection URL
This is the log from postgres:
The files belonging to this database system will be owned by user "postgres".,
This user must also own the server process.,
,
The database cluster will be initialized with locale "en_US.utf8".,
The default database encoding has accordingly been set to "UTF8".,
The default text search configuration will be set to "english".,
,
Data page checksums are disabled.,
,
fixing permissions on existing directory /var/lib/postgresql/data ... ok,
creating subdirectories ... ok,
selecting dynamic shared memory implementation ... posix,
selecting default max_connections ... 100,
selecting default shared_buffers ... 128MB,
selecting default time zone ... Etc/UTC,
creating configuration files ... ok,
running bootstrap script ... ok,
performing post-bootstrap initialization ... ok,
initdb: warning: enabling "trust" authentication for local connections,
You can change this by editing pg_hba.conf or using the option -A, or,
--auth-local and --auth-host, the next time you run initdb.,
syncing data to disk ... ok,
,
,
Success. You can now start the database server using:,
,
pg_ctl -D /var/lib/postgresql/data -l logfile start,
,
waiting for server to start....2021-11-25 16:51:16.070 UTC [50] LOG: starting PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit,
2021-11-25 16:51:16.075 UTC [50] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432",
2021-11-25 16:51:16.097 UTC [51] LOG: database system was shut down at 2021-11-25 16:51:15 UTC,
2021-11-25 16:51:16.110 UTC [50] LOG: database system is ready to accept connections,
done,
server started,
CREATE DATABASE,
,
,
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*,
,
2021-11-25 16:51:16.591 UTC [50] LOG: received fast shutdown request,
2021-11-25 16:51:16.594 UTC [50] LOG: aborting any active transactions,
2021-11-25 16:51:16.598 UTC [50] LOG: background worker "logical replication launcher" (PID 57) exited with exit code 1,
waiting for server to shut down....2021-11-25 16:51:16.608 UTC [52] LOG: shutting down,
2021-11-25 16:51:16.644 UTC [50] LOG: database system is shut down,
done,
server stopped,
,
PostgreSQL init process complete; ready for start up.,
,
2021-11-25 16:51:16.762 UTC [1] LOG: starting PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit,
2021-11-25 16:51:16.762 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432,
2021-11-25 16:51:16.763 UTC [1] LOG: listening on IPv6 address "::", port 5432,
2021-11-25 16:51:16.771 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432",
2021-11-25 16:51:16.782 UTC [64] LOG: database system was shut down at 2021-11-25 16:51:16 UTC,
2021-11-25 16:51:16.802 UTC [1] LOG: database system is ready to accept connections,
2021-11-25 16:52:08.033 UTC [71] ERROR: syntax error at or near "/" at character 17,
2021-11-25 16:52:08.033 UTC [71] STATEMENT: CREATE DATABASE /var/lib/postgresql/data/rasa,
2021-11-25 16:52:08.053 UTC [72] FATAL: database "/var/lib/postgresql/data/rasa" does not exist,
2021-11-25 16:52:49.721 UTC [74] FATAL: database "/var/lib/postgresql/data/rasa" does not exist,
2021-11-25 16:52:49.740 UTC [75] FATAL: database "/var/lib/postgresql/data/rasa" does not exist,
2021-11-25 16:52:51.333 UTC [76] FATAL: database "/var/lib/postgresql/data/rasa" does not exist
Does anyone has any idea of how I can solve this? Thanks in advance!