~mna/hockeygo

33d2b8d86f152c264411d25db0166aa785f33cba — Martin Angers 2 years ago 7f76fb2 master
fix selinux labels
2 files changed, 3 insertions(+), 2 deletions(-)

M docker-compose.yml
M scripts/init.sh
M docker-compose.yml => docker-compose.yml +0 -2
@@ 14,8 14,6 @@ services:
    volumes:
      - ./db/config/mysql:/etc/mysql/conf.d:ro
      - ./db/data/mysql:/var/lib/mysql
    security_opt:
      - label:disable
    secrets:
      - root_pwd
      - user_pwd

M scripts/init.sh => scripts/init.sh +3 -0
@@ 10,16 10,19 @@ function run {
  fi

  mkdir -p db/data/mysql
  chcon -Rt svirt_sandbox_file_t db/data/mysql
  if [[ -s .env_mysql_root_pwd ]]; then
    echo "root password already generated, skipping"
  else
    openssl rand -base64 32 | tr -d '/' > .env_mysql_root_pwd
    chcon -Rt svirt_sandbox_file_t .env_mysql_root_pwd
  fi

  if [[ -s .env_mysql_user_pwd ]]; then
    echo "user password already generated, skipping"
  else
    openssl rand -base64 32 | tr -d '/' > .env_mysql_user_pwd
    chcon -Rt svirt_sandbox_file_t .env_mysql_user_pwd
  fi

  docker-compose up -d