🛫 Deploying #
TIP
Please first see configuration options and make sure you have prepared everything you need.
Depending on requirements you can deploy and run Observer from source or use docker image sultaniman/observer
.
Prerequisites #
Before you can proceed please decide and configure the following things
- Domain for frontend app
APP_DOMAIN
- used to build links in emails, - Mailer backend
MAILER_TYPE
- only sendgrid and smtp gmail supported at the moment each required additional configuration, - Storage
STORAGE
- it is used to store encryption keys as well as to store documents, - Database
DB_URI
- it has to be Postgres 12+, - Encryption keys - personal information of people and animals are encrypted, please generate keys and keep in mind to place keys where they belong.
Configuring storage #
Once you decide on STORAGE_KIND
fs
or s3
, define the following things
STORAGE_ROOT
is used as prefix to build paths when uploading,deleting, reading files,DOCUMENTS_PATH
(relative path toSTORAGE_ROOT
) and finally define,KEYSTORE_PATH
(relative path toSTORAGE_ROOT
),MAX_UPLOAD_SIZE
it defaults to 5Mb but you can also adjust this.
WARNING
For S3 storage keys and documents have to reside in the same S3 bucket under different paths for example if you have a common root key /storage
/storage/
- keys/
- documents/
Keychain in this case is initialised with separate instance of storage which uses different path prefix /storage/keys
, also documents storage also uses different prefix /storage/documents
.
It is also possible to mount EFS and use with filesystem storage backend.
Environment variables #
Observer also allows to use .env
file which can come handy in some cases, simply add configuration in the file.
DB_URI=postgresql+asyncpg://postgres:postgres@localhost:5432/observer
STORAGE_KIND=fs
STORAGE_ROOT=/uploads/
DOCUMENTS_PATH=documents
KEYSTORE_PATH=keys