Skip to content

Commit 5bde6d9

Browse files
Merge branch 'main' into main
2 parents 94acb70 + f628f57 commit 5bde6d9

File tree

3 files changed

+78
-3
lines changed

3 files changed

+78
-3
lines changed

.github/workflows/docker-test.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Docker Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate-compose-files:
11+
name: Validate Docker Compose Files
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Setup environment file
17+
run: |
18+
cp env.example .env
19+
20+
- name: Validate base docker-compose file
21+
run: docker compose config
22+
23+
- name: Validate docker-compose with NGINX
24+
run: |
25+
docker compose -f docker-compose.yml -f docker-compose.nginx.yml config
26+
27+
- name: Validate docker-compose without NGINX
28+
run: docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml config
29+
30+
test-docker-deployment:
31+
name: Test Docker Deployment
32+
runs-on: ubuntu-latest
33+
needs: validate-compose-files
34+
steps:
35+
- uses: actions/checkout@v3
36+
37+
- name: Create required directories
38+
run: |
39+
mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes}
40+
sudo chown -R 2000:2000 ./volumes/app/mattermost
41+
42+
- name: Setup environment file
43+
run: |
44+
cp env.example .env
45+
sed -i 's/DOMAIN=mm.example.com/DOMAIN=localhost/g' .env
46+
47+
- name: Start Mattermost without NGINX
48+
run: |
49+
# Configure docker-compose to use without-nginx setup
50+
docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d
51+
52+
- name: Verify containers are running
53+
run: |
54+
# Allow time for containers to start
55+
sleep 30
56+
docker ps
57+
docker compose ps
58+
59+
- name: Check container logs
60+
run: |
61+
# Check logs for any issues
62+
docker compose logs mattermost --tail 20
63+
docker compose logs postgres --tail 20
64+
65+
- name: Verify Mattermost API is accessible
66+
run: |
67+
# Check that API is responding
68+
curl -f --retry 10 --retry-delay 5 --retry-connrefused http://localhost:8065/api/v4/system/ping || exit 1
69+
70+
- name: Stop containers
71+
run: |
72+
# Clean up containers
73+
docker compose down
74+
if: always()

.github/workflows/shellcheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: ShellCheck
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
shellcheck:
@@ -15,4 +15,4 @@ jobs:
1515
- name: Run ShellCheck
1616
uses: ludeeus/action-shellcheck@master
1717
with:
18-
scandir: './scripts'
18+
scandir: "./scripts"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Mattermost Docker
22
[![ShellCheck](https://github.com/mattermost/docker/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/mattermost/docker/actions/workflows/shellcheck.yml)
3+
[![Docker Test](https://github.com/mattermost/docker/actions/workflows/docker-test.yml/badge.svg)](https://github.com/mattermost/docker/actions/workflows/docker-test.yml)
34

45
The official Docker deployment solution for Mattermost.
56

0 commit comments

Comments
 (0)