···13131414Example of a `docker-compose.yml` file that uses this image:
15151616+```yaml
1617 version: '3'
17181819 volumes:
···3233 - postgres_backups:/backups
3334 env_file:
3435 - ./.env
3636+```
3737+3838+## Maintenance commands
3939+4040+This images adds commands to the original PostgreSQL image for maintenance proposes.
4141+4242+### Create a database backup
4343+4444+Creates a backup of the database. Usage:
4545+4646+ $ docker-compose -f <environment>.yml (exec |run --rm) postgres backup
4747+4848+### View backups
4949+5050+Views a list of all created backups of the database. Usage:
5151+5252+ $ docker-compose -f <environment>.yml (exec |run --rm) postgres backups
5353+5454+### Creates a read only user
5555+5656+Creates a read only user. Usage:
5757+5858+ $ docker-compose -f <environment>.yml (exec |run --rm) postgres createreaduser
5959+6060+### Restore database from a backup
6161+6262+Restores the indicated database backup. Usage:
6363+6464+ $ docker-compose -f <environment>.yml (exec |run --rm) postgres restore <1>
6565+6666+Parameters:
6767+6868+ * `<1>` filename of an existing backup.