mirror of
https://github.com/coltoneshaw/CS-Repro-Mattermost.git
synced 2025-12-23 18:11:34 +01:00
Updated docs and make file
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,13 +1,10 @@
|
|||||||
.PHONY: stop start check_mattermost
|
.PHONY: stop start check_mattermost
|
||||||
|
|
||||||
docker_follow_logs:
|
logs:
|
||||||
@echo "Following logs..."
|
@echo "Following logs..."
|
||||||
@docker compose logs --follow
|
@docker-compose logs --follow
|
||||||
@echo "Done"
|
@echo "Done"
|
||||||
|
|
||||||
|
|
||||||
check_mattermost:
|
|
||||||
|
|
||||||
setup-mattermost:
|
setup-mattermost:
|
||||||
@./scripts/mattermost.sh setup
|
@./scripts/mattermost.sh setup
|
||||||
|
|
||||||
@@ -20,16 +17,19 @@ restore-keycloak:
|
|||||||
start:
|
start:
|
||||||
@echo "Starting..."
|
@echo "Starting..."
|
||||||
@make restore-keycloak
|
@make restore-keycloak
|
||||||
@docker compose up -d
|
@docker-compose up -d
|
||||||
@make setup-mattermost
|
@make setup-mattermost
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
@echo "Stopping..."
|
@echo "Stopping..."
|
||||||
@docker compose down
|
@docker-compose down
|
||||||
@echo "Done"
|
@echo "Done"
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
@docker compose restart
|
@docker-compose restart
|
||||||
|
|
||||||
|
restart-mattermost:
|
||||||
|
@docker-compose restart cs-repro-mattermost
|
||||||
|
|
||||||
reset:
|
reset:
|
||||||
@echo "Resetting..."
|
@echo "Resetting..."
|
||||||
@@ -38,7 +38,7 @@ reset:
|
|||||||
|
|
||||||
delete-dockerfiles:
|
delete-dockerfiles:
|
||||||
@echo "Deleting data..."
|
@echo "Deleting data..."
|
||||||
@docker compose rm
|
@docker-compose rm
|
||||||
@rm -rf ./volumes
|
@rm -rf ./volumes
|
||||||
@echo "Done"
|
@echo "Done"
|
||||||
|
|
||||||
@@ -46,6 +46,6 @@ delete-data: stop delete-dockerfiles
|
|||||||
|
|
||||||
nuke:
|
nuke:
|
||||||
@echo "Nuking Docker..."
|
@echo "Nuking Docker..."
|
||||||
@docker compose down --rmi all --volumes --remove-orphans
|
@docker-compose down --rmi all --volumes --remove-orphans
|
||||||
@make delete-data
|
@make delete-data
|
||||||
|
|
||||||
|
|||||||
55
README.md
55
README.md
@@ -4,34 +4,61 @@ This is a basic reproduction that includes various components preconfigured like
|
|||||||
|
|
||||||
## Making Changes
|
## Making Changes
|
||||||
|
|
||||||
If you're testing changes with Mattermost I do not suggest running `docker compose restart` or `docker compose down / up` because the keycloak instance can quickly get into a failed state with too frequent of restarts. Instead do `docker down mattermost`. Additionally, the keycloak container can take up to 5 minutes to spin up. If it's taking a while with no logs output, just restart the keycloak container **only**.
|
If you're testing changes with Mattermost I do not suggest running `make restart` or `make stop` because the keycloak instance can quickly get into a failed state with too frequent of restarts. Instead do `make restart-mattermost`.
|
||||||
|
|
||||||
|
Additionally, the keycloak container can take up to 5 minutes to spin up. If it's taking a while with no logs output, just restart the keycloak container **only**.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
1. Add an enterprise license to this folder with the name `license.txt`
|
1. Add an enterprise license to this folder with the name `license.mattermost`
|
||||||
note: If you ignore this set Mattermost will not spin up.
|
note: If you ignore this set Mattermost will not spin up.
|
||||||
|
|
||||||
2. Start the docker containers. This may take a second to download everything.
|
2. Start the docker containers. This may take a second to download everything.
|
||||||
|
|
||||||
If you don't want to watch the logs use the below:
|
You'll be prompted on setting up the test data.
|
||||||
```
|
|
||||||
docker-compose up -d
|
|
||||||
// OR
|
|
||||||
docker compose up -d // for docker desktop
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to watch the logs start up with
|
```
|
||||||
|
make start
|
||||||
```bash
|
|
||||||
docker-compose up
|
|
||||||
// OR
|
|
||||||
docker compose up // for docker desktop
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Sign into Mattermost
|
3. Sign into Mattermost
|
||||||
- You can use any of the accounts to sign in.
|
- You can use any of the accounts to sign in.
|
||||||
- The keycloak container can be **very** picky sometimes and require a restart of just that container to sign in with that method the first time.
|
- The keycloak container can be **very** picky sometimes and require a restart of just that container to sign in with that method the first time.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### `make backup-keycloak`
|
||||||
|
|
||||||
|
This takes your exiting keycloak setup and backs it up in the files directory. You most likely don't need this frequently.
|
||||||
|
|
||||||
|
### `make restore-keycloak`
|
||||||
|
|
||||||
|
If you made changes to keycloak, this will copy over the keycloak data. You'll want to delete the `./volumes/keycloak` first.
|
||||||
|
|
||||||
|
### `make stop`
|
||||||
|
|
||||||
|
Simply stops the running contains
|
||||||
|
|
||||||
|
### `make restart`
|
||||||
|
|
||||||
|
Simply restarts the docker containers.
|
||||||
|
|
||||||
|
### `make restart-mattermost`
|
||||||
|
|
||||||
|
Restarts only the Mattermost containers.
|
||||||
|
|
||||||
|
### `make reset`
|
||||||
|
|
||||||
|
This deletes the volumes directory and starts everything again. Easiest way to get to get the environment back the default.
|
||||||
|
|
||||||
|
### `make delete-data`
|
||||||
|
|
||||||
|
This clears all data from the volumes and stops Mattermost.
|
||||||
|
|
||||||
|
### `make nuke`
|
||||||
|
|
||||||
|
Destroys everything (Except your life).
|
||||||
|
|
||||||
## Accounts
|
## Accounts
|
||||||
|
|
||||||
| Username | Password | Keycloak Role | Mattermost Role | Can use LDAP? | Can use SAML? |
|
| Username | Password | Keycloak Role | Mattermost Role | Can use LDAP? | Can use SAML? |
|
||||||
|
|||||||
Reference in New Issue
Block a user