Use a demo database
Pre-requisite: Docker
To import the demo database using our forestadmin/meals-database image, simply run:
1
docker run -p 5432:5432 --name forest_demo_database forestadmin/meals-database
Copied!
That's all! Your database is running locally in a docker container.
To check if the database is correctly setup, you can use the following command to connect to your freshly created database.
1
docker exec -it forest_demo_database psql meals lumber
Copied!
You should get a prompt where you can type SQL queries or PostgreSQL command line \d to see the available list of tables.
1
meals=# \d
2
List of relations
3
Schema | Name | Type | Owner
4
--------+----------------------------+----------+--------
5
public | ar_internal_metadata | table | lumber
6
public | chef_availabilities | table | lumber
7
public | chef_availabilities_id_seq | sequence | lumber
8
public | chefs | table | lumber
9
public | chefs_id_seq | sequence | lumber
10
public | customers | table | lumber
11
public | customers_id_seq | sequence | lumber
12
public | delivery_men | table | lumber
13
public | delivery_men_id_seq | sequence | lumber
14
public | menus | table | lumber
15
public | menus_id_seq | sequence | lumber
16
public | menus_products | table | lumber
17
public | menus_products_id_seq | sequence | lumber
18
public | orders | table | lumber
19
public | orders_id_seq | sequence | lumber
20
public | orders_products | table | lumber
21
public | orders_products_id_seq | sequence | lumber
22
public | product_images | table | lumber
23
public | product_images_id_seq | sequence | lumber
24
public | products | table | lumber
25
public | products_id_seq | sequence | lumber
26
public | schema_migrations | table | lumber
27
(22 rows)
Copied!
To use this database for a new Forest Admin project, you'll need:
Property
Value
User
lumber
Password
secret
Database name
meals
Last modified 1yr ago
Copy link