Skip to main content

Operaciones habituales sobre listmonk.app

You are here:
← All Topics

Documentación General : https://listmonk.app/docs/

Iniciar aplicación después de rebooteo:

docker-compose up app db

Iniciar shell sobre docker container que ejecuta postgresql:

docker exec -it listmonk_db_1 /bin/sh

Entrar a psql

# su postgres
postgres@4e13dee69f17:/$ psql -U listmonk
psql (11.10 (Debian 11.10-1.pgdg90+1))
Type "help" for help.    

Obtener lista de bases de datos

listmonk=# \l
                                 List of databases
   Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges
-----------+----------+----------+------------+------------+-----------------------
 listmonk  | listmonk | UTF8     | en_US.utf8 | en_US.utf8 |
 postgres  | listmonk | UTF8     | en_US.utf8 | en_US.utf8 |
 template0 | listmonk | UTF8     | en_US.utf8 | en_US.utf8 | =c/listmonk          +
           |          |          |            |            | listmonk=CTc/listmonk
 template1 | listmonk | UTF8     | en_US.utf8 | en_US.utf8 | =c/listmonk          +
           |          |          |            |            | listmonk=CTc/listmonk
(4 rows)

Usar base de datos

listmonk=# \c listmonk
You are now connected to database "listmonk" as user "listmonk".

Obtener lista de Tablas

listmonk=# \dt
              List of relations
 Schema |       Name       | Type  |  Owner
--------+------------------+-------+----------
 public | campaign_lists   | table | listmonk
 public | campaign_views   | table | listmonk
 public | campaigns        | table | listmonk
 public | link_clicks      | table | listmonk
 public | links            | table | listmonk
 public | lists            | table | listmonk
 public | media            | table | listmonk
 public | settings         | table | listmonk
 public | subscriber_lists | table | listmonk
 public | subscribers      | table | listmonk
 public | templates        | table | listmonk
(11 rows)

Las tablas campaign_views y link_clicks permiten construir los reportes de usuarios que abren y hacen click respectivamente

listmonk=# select * from campaign_views where campaign_id=13
;
 campaign_id | subscriber_id |          created_at
-------------+---------------+-------------------------------
          13 |             4 | 2020-12-28 23:09:50.119428+00
(1 row)

listmonk=# select * from campaign_views where campaign_id=13
;
 campaign_id | subscriber_id |          created_at
-------------+---------------+-------------------------------
          13 |             4 | 2020-12-28 23:09:50.119428+00
          13 |             6 | 2020-12-29 01:43:03.286724+00
(2 rows)

Iniciar shell sobre docker container que ejecuta app:

docker exec -it listmonk_app_1 /bin/sh