mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
gitlab: fix permissions of /var/lib/mysql before initializing the mysql data directory
This commit is contained in:
parent
eefad0d334
commit
fac42a3783
@ -41,15 +41,15 @@ stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
EOF
|
||||
|
||||
# fix permissions and ownership of /var/lib/mysql
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
chmod 700 /var/lib/mysql
|
||||
|
||||
# initialize MySQL data directory
|
||||
if [ ! -d /var/lib/mysql/mysql ]; then
|
||||
mysql_install_db --user=mysql
|
||||
fi
|
||||
|
||||
# make sure /var/lib/mysql/ has the right permissions in case it is mounted as a volume.
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
chmod 700 /var/lib/mysql
|
||||
|
||||
supervisorctl update
|
||||
|
||||
# wait for mysql server to start (max 120 seconds)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user