MM 7971 dockerhost -> localhost && docker -> docker-compose (#10872)

* replace dockerhost with localhost

* remove uneeded setup-max build step (no more dockerhost)

* changes as recommended by @cpanato

* make clean-docker with docker-compose

* added ports to docker-compose.yml (needed for osx).   ignore error for ldapadd (when already exists)

* add clean-old-docker to legacy.mk

* docker-compose stop instead of down for `make stop-docker`
Этот коммит содержится в:
scott lee davis
2019-08-02 10:53:00 -04:00
коммит произвёл Jesse Hallam
родитель e4582905ea
Коммит 2fa63b10ec
16 изменённых файлов: 112 добавлений и 205 удалений

Просмотреть файл

@@ -10,14 +10,14 @@ echo "Importing mysql dump from version 5.0"
docker exec -i mattermost-mysql mysql -D migrated -uroot -pmostest < $(pwd)/scripts/mattermost-mysql-5.0.sql
echo "Setting up config for db migration"
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(dockerhost:3306)/migrated?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(localhost:3306)/migrated?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DriverName 'mysql' --config $TMPDIR/config.json" run-cli
echo "Running the migration"
make ARGS="version --config $TMPDIR/config.json" run-cli
echo "Setting up config for fresh db setup"
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(dockerhost:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(localhost:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
echo "Setting up fresh db"
make ARGS="version --config $TMPDIR/config.json" run-cli

Просмотреть файл

@@ -10,14 +10,14 @@ echo "Importing postgres dump from version 5.0"
docker exec -i mattermost-postgres psql -U mmuser -d migrated < $(pwd)/scripts/mattermost-postgresql-5.0.sql
echo "Setting up config for db migration"
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@dockerhost:5432/migrated?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@localhost:5432/migrated?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DriverName 'postgres' --config $TMPDIR/config.json" run-cli
echo "Running the migration"
make ARGS="version --config $TMPDIR/config.json" run-cli
echo "Setting up config for fresh db setup"
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@dockerhost:5432/latest?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@localhost:5432/latest?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
echo "Setting up fresh db"
make ARGS="version --config $TMPDIR/config.json" run-cli