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`
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
e4582905ea
Коммит
2fa63b10ec
@@ -5,6 +5,8 @@ services:
|
||||
restart: always
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_HOST: "%"
|
||||
MYSQL_ROOT_PASSWORD: mostest
|
||||
@@ -19,6 +21,8 @@ services:
|
||||
restart: always
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: mmuser
|
||||
POSTGRES_PASSWORD: mostest
|
||||
@@ -29,6 +33,8 @@ services:
|
||||
command: "server /data"
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "9000:9000"
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minioaccesskey
|
||||
MINIO_SECRET_KEY: miniosecretkey
|
||||
@@ -38,11 +44,18 @@ services:
|
||||
restart: always
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "10025:10025"
|
||||
- "10080:10080"
|
||||
- "10110:10110"
|
||||
openldap:
|
||||
image: "osixia/openldap:1.2.2"
|
||||
restart: always
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "389:389"
|
||||
- "636:636"
|
||||
environment:
|
||||
LDAP_TLS_VERIFY_CLIENT: "never"
|
||||
LDAP_ORGANISATION: "Mattermost Test"
|
||||
@@ -55,6 +68,9 @@ services:
|
||||
image: "mattermost/mattermost-elasticsearch-docker:6.5.1"
|
||||
networks:
|
||||
- mm-test
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
environment:
|
||||
http.host: "0.0.0.0"
|
||||
transport.host: "127.0.0.1"
|
||||
@@ -63,7 +79,8 @@ services:
|
||||
image: redis
|
||||
networks:
|
||||
- mm-test
|
||||
|
||||
ports:
|
||||
- "6379:6379"
|
||||
start_dependencies:
|
||||
image: mattermost/mattermost-wait-for-dep:latest
|
||||
networks:
|
||||
|
||||
@@ -3,3 +3,56 @@ test-te: test-server
|
||||
|
||||
# test-ee used to just run the enterprise edition tests, but now runs whatever is available
|
||||
test-ee: test-server
|
||||
|
||||
# clean old docker images
|
||||
clean-old-docker:
|
||||
@echo Removing docker containers
|
||||
|
||||
@if [ $(shell docker ps -a --no-trunc --quiet --filter name=^/mattermost-mysql$$ | wc -l) -eq 1 ]; then \
|
||||
echo removing mattermost-mysql; \
|
||||
docker stop mattermost-mysql > /dev/null; \
|
||||
docker rm -v mattermost-mysql > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a --no-trunc --quiet --filter name=^/mattermost-mysql-unittest$$ | wc -l) -eq 1 ]; then \
|
||||
echo removing mattermost-mysql-unittest; \
|
||||
docker stop mattermost-mysql-unittest > /dev/null; \
|
||||
docker rm -v mattermost-mysql-unittest > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a --no-trunc --quiet --filter name=^/mattermost-postgres$$ | wc -l) -eq 1 ]; then \
|
||||
echo removing mattermost-postgres; \
|
||||
docker stop mattermost-postgres > /dev/null; \
|
||||
docker rm -v mattermost-postgres > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a --no-trunc --quiet --filter name=^/mattermost-postgres-unittest$$ | wc -l) -eq 1 ]; then \
|
||||
echo removing mattermost-postgres-unittest; \
|
||||
docker stop mattermost-postgres-unittest > /dev/null; \
|
||||
docker rm -v mattermost-postgres-unittest > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 1 ]; then \
|
||||
echo removing mattermost-openldap; \
|
||||
docker stop mattermost-openldap > /dev/null; \
|
||||
docker rm -v mattermost-openldap > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
|
||||
echo removing mattermost-inbucket; \
|
||||
docker stop mattermost-inbucket > /dev/null; \
|
||||
docker rm -v mattermost-inbucket > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a | grep -ci mattermost-minio) -eq 1 ]; then \
|
||||
echo removing mattermost-minio; \
|
||||
docker stop mattermost-minio > /dev/null; \
|
||||
docker rm -v mattermost-minio > /dev/null; \
|
||||
fi
|
||||
|
||||
@if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 1 ]; then \
|
||||
echo removing mattermost-elasticsearch; \
|
||||
docker stop mattermost-elasticsearch > /dev/null; \
|
||||
docker rm -v mattermost-elasticsearch > /dev/null; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ package:
|
||||
sed -i'' -e 's|"SendEmailNotifications": true,|"SendEmailNotifications": false,|g' $(DIST_PATH)/config/config.json
|
||||
sed -i'' -e 's|"FeedbackEmail": "test@example.com",|"FeedbackEmail": "",|g' $(DIST_PATH)/config/config.json
|
||||
sed -i'' -e 's|"ReplyToAddress": "test@example.com",|"ReplyToAddress": "",|g' $(DIST_PATH)/config/config.json
|
||||
sed -i'' -e 's|"SMTPServer": "dockerhost",|"SMTPServer": "",|g' $(DIST_PATH)/config/config.json
|
||||
sed -i'' -e 's|"SMTPServer": "localhost",|"SMTPServer": "",|g' $(DIST_PATH)/config/config.json
|
||||
sed -i'' -e 's|"SMTPPort": "2500",|"SMTPPort": "",|g' $(DIST_PATH)/config/config.json
|
||||
|
||||
@# Package webapp
|
||||
|
||||
Ссылка в новой задаче
Block a user