mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2025-12-08 17:36:24 +00:00
install: do not delete contents of /var/lib/mysql/
We now use mysql commands to check of the database exists.
This commit is contained in:
parent
4263e85730
commit
dd44c2b6cd
@ -72,9 +72,6 @@ sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab
|
||||
# create the /var/run/sshd directory (required for sshd to start)
|
||||
mkdir -p /var/run/sshd
|
||||
|
||||
# clear mysql database
|
||||
rm -rf /var/lib/mysql/*
|
||||
|
||||
# configure nginx
|
||||
sed 's/YOUR_SERVER_FQDN/localhost/' -i /etc/nginx/sites-available/gitlab
|
||||
echo "daemon off;" >> /etc/nginx/nginx.conf
|
||||
|
||||
@ -22,9 +22,8 @@ DB_POOL=${DB_POOL:-5}
|
||||
|
||||
# start mysql server if ${DB_HOST} is localhost
|
||||
if [ "${DB_HOST}" == "localhost" ]; then
|
||||
if [ ! -d /var/lib/mysql/mysql ]; then
|
||||
if ! echo "USE ${DB_NAME}" | mysql -uroot ${DB_PASS:+-p$DB_PASS} >/dev/null 2>&1; then
|
||||
DB_INIT="yes"
|
||||
mysql_install_db --user=mysql
|
||||
fi
|
||||
|
||||
cat > /etc/supervisor/conf.d/mysqld.conf <<EOF
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user