Base database image for Aquila
PostgreSQL image which follows sets up a basic Aquila Database. It is not intended to be used on it's own but to be extended. It sets up three users:
- admin: Admin of the database
- rw: User allowed to read and write to database tables
- ro: User only allowed to view database tables
Usernames and passwords can be set providing the following environment variables on start up:
ADMIN_USERNAME="admin" RO_USERNAME="ro" RW_USERNAME="rw" ADMIN_PW="admin_pw" RO_PW="ro_pw" RW_PW="rw_pw"
It goes without saying that it is vital to provide the password environment variables in any deployments.
An inheriting image needs two folders: ddl and sql. Any Data Definition Language statements should go into ddl while any inserts of example data should go into sql. Files in both folders are sorted by name before they are applied. It is recommended to follow a pattern which allows you to adjust order easily. This can be done by prefixing all your files with 3 digits e.g. 001-file.sql