Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop docker healthchecks #1211

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
72fb742
Create config.json
ninjamonkey198206 Jun 1, 2022
a7f79a2
Change URLs to defaults for editing during install
ninjamonkey198206 Jun 1, 2022
ab02d87
Update config.json
ninjamonkey198206 Jun 1, 2022
2646267
Create local_settings.py
ninjamonkey198206 Jun 1, 2022
8799af4
Create app.ini
ninjamonkey198206 Jun 1, 2022
84a39dd
Create rmm.service
ninjamonkey198206 Jun 1, 2022
f026940
Create daphne.service
ninjamonkey198206 Jun 1, 2022
6b9b081
Create nats.service
ninjamonkey198206 Jun 1, 2022
d0f932c
Create nats-api.service
ninjamonkey198206 Jun 1, 2022
52867db
Create celery.service
ninjamonkey198206 Jun 1, 2022
4183be2
Create celery.conf
ninjamonkey198206 Jun 1, 2022
d564657
Create meshcentral.conf
ninjamonkey198206 Jun 1, 2022
3c15fe8
Create rmm.conf
ninjamonkey198206 Jun 1, 2022
678d089
Create celerybeat.service
ninjamonkey198206 Jun 1, 2022
0ba355d
Create meshcentral.service
ninjamonkey198206 Jun 1, 2022
0798a5a
Create frontend.conf
ninjamonkey198206 Jun 1, 2022
68dd2ea
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 1, 2022
5d27f63
Update frontend.conf
ninjamonkey198206 Jun 1, 2022
be851c9
Update meshcentral.conf
ninjamonkey198206 Jun 1, 2022
edab4f7
Update rmm.conf
ninjamonkey198206 Jun 1, 2022
621273c
Update frontend.conf
ninjamonkey198206 Jun 1, 2022
3ff4242
Update meshcentral.conf
ninjamonkey198206 Jun 1, 2022
fbd0164
Update rmm.conf
ninjamonkey198206 Jun 1, 2022
1f30e57
Update config.json
ninjamonkey198206 Jun 1, 2022
84e941b
Update local_settings.py
ninjamonkey198206 Jun 1, 2022
9a97fae
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 5, 2022
757104a
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 8, 2022
9a9789d
Update app.ini
ninjamonkey198206 Jun 10, 2022
31e0aad
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 15, 2022
ebc5fc2
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 17, 2022
a5fbe80
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 20, 2022
66e5969
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 22, 2022
e65ea05
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 23, 2022
a48be3d
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 23, 2022
5c6139f
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 25, 2022
bdd7915
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 26, 2022
c827cb1
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 27, 2022
f1a77ad
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 29, 2022
6b2dc2d
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jun 30, 2022
78e273a
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 3, 2022
4beda87
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 4, 2022
8df102c
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 5, 2022
d7fd050
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 6, 2022
ed5f642
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 7, 2022
271282c
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 7, 2022
288f793
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 8, 2022
cb5f351
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 9, 2022
4b81a19
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 10, 2022
3c8a9d3
Merge branch 'amidaware:develop' into develop
ninjamonkey198206 Jul 13, 2022
af050c6
Delete default-configs directory
ninjamonkey198206 Jul 17, 2022
3413a9d
Delete service-definitions directory
ninjamonkey198206 Jul 17, 2022
6d6dfa3
Update docker-compose.yml
ninjamonkey198206 Jul 17, 2022
45f5c2e
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 18, 2022
b2b3140
Added config for monitoring port
ninjamonkey198206 Jul 18, 2022
a4926f2
Added port for monitoring
ninjamonkey198206 Jul 18, 2022
4364726
Added missing comma
ninjamonkey198206 Jul 18, 2022
1c9dac4
Added tactical user to remove root user issue
ninjamonkey198206 Jul 18, 2022
949f53a
Added curl for health check capability
ninjamonkey198206 Jul 18, 2022
d1220c1
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 19, 2022
34fd6ec
Removed port as it is unnecessary for localhost
ninjamonkey198206 Jul 19, 2022
f577ec8
Bind monitoring port to localhost
ninjamonkey198206 Jul 19, 2022
a04b373
Fix formatting for localhost binding
ninjamonkey198206 Jul 19, 2022
3a23a9d
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 20, 2022
b2f834b
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 26, 2022
f4c6353
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 27, 2022
356b891
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Jul 29, 2022
15680fd
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 2, 2022
40970ae
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 5, 2022
e71b3d3
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 5, 2022
949a980
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 12, 2022
4f8eb22
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 14, 2022
2611bad
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Aug 15, 2022
bf68d12
Merge branch 'amidaware:develop' into develop-docker-healthchecks
ninjamonkey198206 Feb 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/tacticalrmm/tacticalrmm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def reload_nats() -> None:
"cert_file": cert_file,
"key_file": key_file,
},
"http": "localhost:8222",
"authorization": {"users": users},
"max_payload": 67108864,
"port": nats_std_port, # internal only
Expand Down
2 changes: 2 additions & 0 deletions docker/containers/tactical-meshcentral/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RUN apk add --no-cache bash

SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]

RUN apk add --no-cache curl

COPY api/tacticalrmm/tacticalrmm/settings.py /tmp/settings.py

RUN npm install meshcentral@$(grep -o 'MESH_VER.*' /tmp/settings.py | cut -d'"' -f 2)
Expand Down
24 changes: 24 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ services:
POSTGRES_DB: tacticalrmm
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}
healthcheck:
test: [ "CMD", "pg_isready", "-U", "tactical", "-d", "tacticalrmm" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test: [ "CMD", "pg_isready", "-U", "tactical", "-d", "tacticalrmm" ]
test: [ "CMD", "pg_isready", "-U", "$$POSTGRES_USER", "-d", "$$POSTGRES_DB" ]

Maybe use env's here?

interval: 30s
timeout: 10s
retries: 5
start_period: 10s
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
Expand All @@ -42,6 +48,12 @@ services:
user: 1000:1000
command: redis-server
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
volumes:
- redis_data:/data
networks:
Expand Down Expand Up @@ -128,6 +140,12 @@ services:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
MONGO_INITDB_DATABASE: meshcentral
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/meshcentral --quiet
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
networks:
- mesh-db
volumes:
Expand Down Expand Up @@ -191,6 +209,12 @@ services:
MESH_HOST: ${MESH_HOST}
CERT_PUB_KEY: ${CERT_PUB_KEY}
CERT_PRIV_KEY: ${CERT_PRIV_KEY}
healthcheck:
test: [ "CMD", "curl", "--silent", "--fail", "http://localhost:8080" ]
github-advanced-security[bot] marked this conversation as resolved.
Show resolved Hide resolved
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
networks:
proxy:
ipv4_address: 172.20.0.20
Expand Down