make use of postgres image db init script, use their variable naming … (#100)

* make use of postgres image db init script, use their variable naming scheme, make setup-wale executable so it can actually run
This commit is contained in:
nikosch86 authored and Pan Luo committed 2017-02-23 13:32:24 -08:00
1 parent c6e177cdf2
commit 142b766cde
7 files changed
+18 -27

No files matched your search

+1 -2
View File
@@ -9,8 +9,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD make_db.sh /docker-entrypoint-initdb.d/
ADD setup-wale.sh /docker-entrypoint-initdb.d/
COPY setup-wale.sh /docker-entrypoint-initdb.d/
COPY docker-entrypoint1.sh /
RUN chmod +x /docker-entrypoint1.sh
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
set -e
MM_USERNAME=${MM_USERNAME:-mmuser}
MM_PASSWORD=${MM_PASSWORD:-mmuser_password}
MM_DBNAME=${MM_DBNAME:-mattermost}
psql -v ON_ERROR_STOP=1 --username "postgres" <<- EOSQL
CREATE DATABASE $MM_DBNAME;
CREATE USER $MM_USERNAME WITH PASSWORD '$MM_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE $MM_DBNAME to $MM_USERNAME;
EOSQL
Regular → Executable
View File
File mode changed.