Dockerized Piccolo Admin to use existing (legacy) database.
Clone repository.
git clone https://github.com/piccolo-orm/piccolo-admin-docker.gitCreating an .env file.
cp .env.example .env && rm .env.exampleRun the Docker container.
docker-compose up -dAfter site is running log in as admin user on localhost:8000 and use legacy database.
Stop the Docker container.
docker-compose downPiccolo Admin has a flexible UI with lots of configuration options to display only the columns you want your users to see. More information on Piccolo Admin docs.
After Piccolo Admin is started with all the tables from the existing database, we can do additional configuration through the config.yaml file.
Example of config.yaml:
tables:
# An example of additional Piccolo Admin configuration
- table_name: actor
visible_columns:
- first_name
visible_filters:
- actor_id
- first_name
menu_group: Movies
link_column: first_name
- table_name: address
visible_columns:
- address_id
- address
- city_id
visible_filters:
- address_id
- address
- city_id
menu_group: Location
rich_text_columns:
- address
- table_name: city
visible_columns:
- city_id
- city
visible_filters:
- city_id
- city
menu_group: Location
- table_name: country
visible_columns:
- country_id
- country
visible_filters:
- country_id
- country
sidebar_links:
Piccolo Admin: https://piccolo-admin.readthedocs.io/en/latest/index.html
Piccolo ORM: https://piccolo-orm.readthedocs.io/en/latest/index.htmlFor these changes to take effect, you must stop the container and rebuild it with.
docker-compose up -d --build