udpate docs
This commit is contained in:
1 parent
40a7599388
commit
bbb051406f
10 files changed
+32
-173
No files matched your search
@@ -35,9 +35,9 @@ npm run format # Prettier formatting
|
|||||||
|
|
||||||
### Docker Development
|
### Docker Development
|
||||||
```bash
|
```bash
|
||||||
cd docker/dev
|
docker build -f docker/Dockerfile -t checkmate . # build the mono image (server + built client)
|
||||||
./build_images.sh
|
docker compose -f docker/dev/docker-compose.yaml up # local full stack (builds image, runs mongo + worker)
|
||||||
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:6.0
|
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:8.0 # just a dev database
|
||||||
```
|
```
|
||||||
|
|
||||||
## Environment Setup
|
## Environment Setup
|
||||||
|
|||||||
+1
-25
@@ -88,34 +88,10 @@ cd Checkmate
|
|||||||
|
|
||||||
#### Step 2: Set Up Docker Containers (MongoDB)
|
#### Step 2: Set Up Docker Containers (MongoDB)
|
||||||
|
|
||||||
Navigate to the Docker dev directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd docker/dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the Docker images:
|
|
||||||
|
|
||||||
Linux:
|
|
||||||
```bash
|
|
||||||
./build_images.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Windows:
|
|
||||||
```bash
|
|
||||||
./build_images.bat
|
|
||||||
```
|
|
||||||
|
|
||||||
Run MongoDB container:
|
Run MongoDB container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:6.0
|
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:8.0
|
||||||
```
|
|
||||||
|
|
||||||
Navigate back to the root directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ../..
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 3: Set Up the Backend (Server)
|
#### Step 3: Set Up the Backend (Server)
|
||||||
|
|||||||
@@ -79,7 +79,16 @@ Usage instructions can be found [here](https://checkmate.so/docs).
|
|||||||
<a id="installation"></a>
|
<a id="installation"></a>
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
See installation instructions in [Checkmate documentation portal](https://checkmate.so/docs).
|
The quickest way to run Checkmate is the reference Docker Compose file, which runs the all-in-one image (`ghcr.io/bluewave-labs/checkmate`) plus MongoDB:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -O https://raw.githubusercontent.com/bluewave-labs/checkmate/master/docker/docker-compose.yaml
|
||||||
|
JWT_SECRET="$(openssl rand -hex 32)" docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Then open http://localhost:52345. If the app is reached at another origin (domain or LAN IP), set `CLIENT_HOST` accordingly. To build the image yourself, run `docker build -f docker/Dockerfile -t checkmate .` from a checkout. For TLS, put any reverse proxy (Caddy, Traefik, nginx) in front of port 52345.
|
||||||
|
|
||||||
|
See full installation instructions in the [Checkmate documentation portal](https://checkmate.so/docs).
|
||||||
|
|
||||||
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa), [Cloudzy](https://cloudzy.com/marketplace/checkmate) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa), [Cloudzy](https://cloudzy.com/marketplace/checkmate) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
||||||
|
|
||||||
|
|||||||
@@ -28,5 +28,4 @@ dist-ssr
|
|||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
*.sh
|
*.sh
|
||||||
!env.sh
|
|
||||||
.env.development
|
.env.development
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
for i in $(env | grep UPTIME_APP_)
|
|
||||||
do
|
|
||||||
key=$(echo $i | cut -d '=' -f 1)
|
|
||||||
value=$(echo $i | cut -d '=' -f 2-)
|
|
||||||
echo $key=$value
|
|
||||||
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
|
|
||||||
done
|
|
||||||
@@ -19,8 +19,6 @@ If you need to monitor internal HTTPS endpoints with certificates from private C
|
|||||||
### Example Configurations
|
### Example Configurations
|
||||||
The `docker/dev/` directory contains example configurations:
|
The `docker/dev/` directory contains example configurations:
|
||||||
- `docker-compose.custom-ca-example.yaml` - Example Docker Compose with custom CA
|
- `docker-compose.custom-ca-example.yaml` - Example Docker Compose with custom CA
|
||||||
- `server-custom-ca.Dockerfile` - Example Dockerfile for OS-level CA trust
|
|
||||||
- `export-smallstep-ca.sh` - Helper script for Smallstep CA export
|
|
||||||
|
|
||||||
## Contributing to Documentation
|
## Contributing to Documentation
|
||||||
|
|
||||||
|
|||||||
+18
-33
@@ -18,8 +18,8 @@ Add a volume mount for your CA certificate and set the environment variable:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
server:
|
checkmate:
|
||||||
image: uptime_server:latest
|
image: ghcr.io/bluewave-labs/checkmate:latest
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "52345:52345"
|
- "52345:52345"
|
||||||
@@ -30,7 +30,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./certs:/certs:ro
|
- ./certs:/certs:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
|
||||||
- mongodb
|
- mongodb
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -52,67 +51,53 @@ For more comprehensive trust configuration, you can create a derived Dockerfile
|
|||||||
|
|
||||||
### Custom Dockerfile
|
### Custom Dockerfile
|
||||||
|
|
||||||
Create `docker/dev/server-custom-ca.Dockerfile`:
|
Create `checkmate-custom-ca.Dockerfile`:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM node:20-alpine
|
FROM ghcr.io/bluewave-labs/checkmate:latest
|
||||||
|
|
||||||
# Install ca-certificates for Alpine
|
USER root
|
||||||
RUN apk add --no-cache ca-certificates
|
|
||||||
|
|
||||||
WORKDIR /app
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY ./server/package*.json ./
|
# Copy your custom CA certificate (must have a .crt extension)
|
||||||
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
COPY ./server/ ./
|
|
||||||
|
|
||||||
# Copy your custom CA certificate
|
|
||||||
COPY ./certs/custom-ca.crt /usr/local/share/ca-certificates/
|
COPY ./certs/custom-ca.crt /usr/local/share/ca-certificates/
|
||||||
|
|
||||||
# Update CA certificates
|
# Update CA certificates
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
|
|
||||||
EXPOSE 52345
|
USER node
|
||||||
|
|
||||||
CMD ["node", "src/index.js"]
|
# Node uses its bundled CA store by default; make it read the system store
|
||||||
|
ENV NODE_OPTIONS="--use-system-ca"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Compose Override
|
### Docker Compose Override
|
||||||
|
|
||||||
Create `docker/dev/docker-compose.custom-ca.yaml`:
|
Create `docker-compose.custom-ca.yaml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
server:
|
checkmate:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: server-custom-ca.Dockerfile
|
dockerfile: checkmate-custom-ca.Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "52345:52345"
|
- "52345:52345"
|
||||||
env_file:
|
env_file:
|
||||||
- server.env
|
- server.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
|
||||||
- mongodb
|
- mongodb
|
||||||
```
|
```
|
||||||
|
|
||||||
Run with: `docker-compose -f docker-compose.yaml -f docker-compose.custom-ca.yaml up`
|
Run with: `docker compose -f docker-compose.yaml -f docker-compose.custom-ca.yaml up`
|
||||||
|
|
||||||
## Alpine Linux Considerations
|
## Base Image Considerations
|
||||||
|
|
||||||
Since Checkmate uses Alpine Linux as the base image, you need to install the `ca-certificates` package:
|
The Checkmate image is Debian-based (`node:22-slim`), which does not ship the `ca-certificates` package — install it before running `update-ca-certificates` (see the Dockerfile above). Certificates dropped into `/usr/local/share/ca-certificates/` must have a `.crt` extension, and Node only consults the system store when started with `--use-system-ca`. For most setups the `NODE_EXTRA_CA_CERTS` compose approach is simpler.
|
||||||
|
|
||||||
```dockerfile
|
|
||||||
# Install ca-certificates for Alpine
|
|
||||||
RUN apk add --no-cache ca-certificates
|
|
||||||
|
|
||||||
# Copy and update CA certificates
|
|
||||||
COPY ./certs/custom-ca.crt /usr/local/share/ca-certificates/
|
|
||||||
RUN update-ca-certificates
|
|
||||||
```
|
|
||||||
|
|
||||||
## Smallstep CA Configuration
|
## Smallstep CA Configuration
|
||||||
|
|
||||||
|
|||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
**(Please remove this line only before submitting your PR. Ensure that all relevant items are checked before submission.)**
|
|
||||||
|
|
||||||
## Describe your changes
|
|
||||||
|
|
||||||
Briefly describe the changes you made and their purpose.
|
|
||||||
|
|
||||||
## Write your issue number after "Fixes "
|
|
||||||
|
|
||||||
Fixes #123
|
|
||||||
|
|
||||||
## Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.
|
|
||||||
|
|
||||||
- [ ] (Do not skip this or your PR will be closed) I deployed the application locally.
|
|
||||||
- [ ] (Do not skip this or your PR will be closed) I have performed a self-review and testing of my code.
|
|
||||||
- [ ] I have included the issue # in the PR.
|
|
||||||
- [ ] I have added i18n support to visible strings (instead of `<div>Add</div>`, use):
|
|
||||||
|
|
||||||
```Javascript
|
|
||||||
const { t } = useTranslation();
|
|
||||||
<div>{t('add')}</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
- [ ] The issue I am working on is assigned to me.
|
|
||||||
- [ ] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
|
|
||||||
- [ ] My PR is granular and targeted to one specific feature.
|
|
||||||
-68
@@ -1,68 +0,0 @@
|
|||||||
name: Staging deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["develop"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker-build-and-push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Server Docker image
|
|
||||||
run: |
|
|
||||||
docker build \
|
|
||||||
-t ghcr.io/bluewave-labs/checkmate-backend:staging \
|
|
||||||
-f ./docker/staging/server.Dockerfile \
|
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate-backend \
|
|
||||||
.
|
|
||||||
|
|
||||||
- name: Push Server Docker image
|
|
||||||
run: docker push ghcr.io/bluewave-labs/checkmate-backend:staging
|
|
||||||
|
|
||||||
- name: Build Mongo Docker image
|
|
||||||
run: |
|
|
||||||
docker build \
|
|
||||||
-t ghcr.io/bluewave-labs/checkmate-mongo:staging \
|
|
||||||
-f ./docker/staging/mongoDB.Dockerfile \
|
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate-backend \
|
|
||||||
.
|
|
||||||
|
|
||||||
- name: Push MongoDB Docker image
|
|
||||||
run: docker push ghcr.io/bluewave-labs/checkmate-mongo:staging
|
|
||||||
|
|
||||||
- name: Build Redis Docker image
|
|
||||||
run: |
|
|
||||||
docker build \
|
|
||||||
-t ghcr.io/bluewave-labs/checkmate-redis:staging \
|
|
||||||
-f ./docker/staging/redis.Dockerfile \
|
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate-backend \
|
|
||||||
.
|
|
||||||
|
|
||||||
- name: Push Redis Docker image
|
|
||||||
run: docker push ghcr.io/bluewave-labs/checkmate-redis:staging
|
|
||||||
|
|
||||||
deploy-to-staging:
|
|
||||||
needs: docker-build-and-push
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: SSH into server and restart container using Docker Compose
|
|
||||||
uses: appleboy/ssh-action@v1.0.0
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.STAGING_SERVER_HOST }}
|
|
||||||
username: ${{ secrets.STAGING_SERVER_USER }}
|
|
||||||
key: ${{ secrets.STAGING_SERVER_SSH_KEY }}
|
|
||||||
script: |
|
|
||||||
cd checkmate/server/docker/staging
|
|
||||||
docker compose down
|
|
||||||
docker compose pull
|
|
||||||
docker compose up -d
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
for i in $(env | grep UPTIME_APP_)
|
|
||||||
do
|
|
||||||
key=$(echo $i | cut -d '=' -f 1)
|
|
||||||
value=$(echo $i | cut -d '=' -f 2-)
|
|
||||||
echo $key=$value
|
|
||||||
find ./public/assets -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
|
|
||||||
done
|
|
||||||
Reference in new issue
Block a user