Skip to content

How to use files from local machine in the AdminUI application

Kantemir Tvorogov edited this page Aug 8, 2023 · 3 revisions

You might want to supply AdminUI application with source files fetched from local machine, for instance, on local start up

To do that you should:

  1. Navigate to acuity-docker repository.
  2. Verify admin-local-storage.yml config file
local-storage:
# Could be changed to the path of a local folder for development purposes
path: /usr/root/local-file-storage
# Could be switched to another, e.g. 'azure-file://' or 'smb://' (to emulate Azure or Samba storage correspondingly);
# in this case 'azure-storage'/'smb-storage' profiles should be disabled to avoid conflict
prefix: local://

path - content of folder will be available by AdminUI. In case of docker app start up you should recall that this option maps the directory inside AdminUI Docker container. So we have a binding between machine and container inside docker-compose.yml
files

volumes:
  - ./logs/adminui:/var/log
  - ./local-file-storage:/usr/root/local-file-storage

When using this configuration you should put desired files inside path: folder.

dir_structure

When starting an application you should enable local-storage profile. You could do that by adding it in corresponding .env file of acuity-docker project. By default it is enabled in .env.dev file

# Spring profile defining file storage type. There are `azure-storage`,`local-storage` and `smb-storage` profiles
STORAGE_PROFILE=local-storage

When the project starts, you could navigate to mapping menu of AdminUI and manually enter the direction of your local file

mapping

For choosing a path please, use prefix mentioned in admin-local-storage.yml config file. Example: path this type of mapping will give AdminUI root content of mapped directory

Clone this wiki locally