Sha256: 3da9f44b1e6c96c3ab9c74452a27a906fbb10b9eddd43bb9fa428b1ed63b146d

Contents?: true

Size: 820 Bytes

Versions: 7

Compression:

Stored size: 820 Bytes

Contents

FROM mysql:5.7
ENV MYSQL_ROOT_PASSWORD="<%= SecureRandom.hex(16).force_encoding(Encoding::US_ASCII) %>"

RUN echo "\n"\
  "CREATE DATABASE IF NOT EXISTS \`<%= app_name %>_development\`;\n"\
  "CREATE DATABASE IF NOT EXISTS \`<%= app_name %>_production\`;\n"\
  "CREATE DATABASE IF NOT EXISTS \`<%= app_name %>_staging\`;\n"\
  "CREATE DATABASE IF NOT EXISTS \`<%= app_name %>_test\`;\n"\
  "CREATE USER '${DB_USER}'@'%' IDENTIFIED BY '${DB_PASSWORD}';\n"\
  "GRANT ALL ON \`<%= app_name %>_development\`.* TO '${DB_USER}'@'%';\n"\
  "GRANT ALL ON \`<%= app_name %>_production\`.* TO '${DB_USER}'@'%';\n"\
  "GRANT ALL ON \`<%= app_name %>_staging\`.* TO '${DB_USER}'@'%';\n"\
  "GRANT ALL ON \`<%= app_name %>_test\`.* TO '${DB_USER}'@'%';\n"\
  "FLUSH PRIVILEGES;"\
  >> /docker-entrypoint-initdb.d/prepare_rails_db.sql

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kowl-0.0.7 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.6 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.5 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.4 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.3 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.2 lib/kowl/templates/docker/mysql/Dockerfile.tt
kowl-0.0.1 lib/kowl/templates/docker/mysql/Dockerfile.tt