snackpot.yml - add docker compose config
Nominally working and tested on a remote VM
This commit is contained in:
2
templates/docker-compose/postgres/Dockerfile
Normal file
2
templates/docker-compose/postgres/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM postgres:11.9-alpine
|
||||
COPY --chown={{ postgres_db_user }}:{{ postgres_db_user }} init.sql /docker-entrypoint-initdb.d/
|
||||
6
templates/docker-compose/postgres/init.sql
Normal file
6
templates/docker-compose/postgres/init.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE USER {{ nextcloud_db_user }};
|
||||
ALTER USER {{ nextcloud_db_user }} WITH ENCRYPTED PASSWORD 'md5{{ (nextcloud_db_password + nextcloud_db_user) | hash("md5") }}';
|
||||
DROP DATABASE IF EXISTS {{ nextcloud_db }};
|
||||
CREATE DATABASE {{ nextcloud_db }} TEMPLATE template0 ENCODING 'UNICODE';
|
||||
ALTER DATABASE {{ nextcloud_db }} OWNER TO {{ nextcloud_db_user }};
|
||||
GRANT ALL PRIVILEGES ON DATABASE {{ nextcloud_db }} TO {{ nextcloud_db_user }};
|
||||
Reference in New Issue
Block a user