-- create the databases;
CREATE DATABASE nextcloud;

CREATE DATABASE gitea;

CREATE DATABASE mattermost;

-- create users and privileges
CREATE USER nextcloud WITH PASSWORD 'jX9hKI2POvt1VrjVbBs4';
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;

CREATE USER gitea WITH PASSWORD 'sadlkf0234lsdf';
GRANT ALL PRIVILEGES ON DATABASE gitea TO gitea;

CREATE USER mattermost WITH PASSWORD 'skdr02439spfgojsl';
GRANT ALL PRIVILEGES ON DATABASE mattermost TO mattermost;
