Healthchecks

Open-source cron job and background task monitoring service, written in Python & Django.

アクセス

  • ブラウザを開いて、次のURLにアクセスしてください: https://<SERVER_IP>
  • ブラウザからSSL警告が表示される可能性があります(自己署名証明書)

Create Admin Account

Before logging in, you must create an admin account.

Run the following command:

docker exec -it healthchecks /opt/healthchecks/manage.py createsuperuser

Follow the prompts to enter:

  • Email address
  • パスワード

Once completed, you can log in using the newly created credentials.

重要なファイルとディレクトリ

  • インストール先ディレクトリ: /root/healthchecks
  • 環境ファイル: /root/healthchecks/.env
  • Docker Compose ファイル: /root/healthchecks/docker-compose.yml
  • SQLite database: /var/lib/docker/volumes/healthchecks_healthchecks-data/_data
  • Nginx サイト設定: /etc/nginx/sites-available/healthchecks
  • 有効なサイト: /etc/nginx/sites-enabled/healthchecks
  • SSL証明書: /etc/nginx/ssl/fullchain.pem, /etc/nginx/ssl/privkey.pem
  • Admin credentials: /root/.cloudzy-creds

Manage the Stack

cd /root/healthchecks

# Start services
docker compose up -d

# Stop services
docker compose down

# Restart services
docker compose restart

# View logs
docker compose logs -f

Email Settings Configuration (Optional)

Email configuration is required to enable notifications (e.g., alerts, reports).

Ensure SMTP connections are allowed on this server. Request SMTP access if it is currently disabled.

Edit the environment file:

nano /root/healthchecks/.env

Uncomment and configure the following variables with your SMTP provider details:

# DEFAULT_FROM_EMAIL=fixme-email-address-here
# EMAIL_HOST=fixme-smtp-host-here
# EMAIL_HOST_PASSWORD=fixme-smtp-password-here
# EMAIL_HOST_USER=fixme-smtp-username-here
# EMAIL_PORT=587
# EMAIL_USE_TLS=True

Apply the changes by restarting the service:

docker compose up -d

Enabling SSL with a Domain (Optional)

1. ドメインをサーバーのIPアドレスに設定してください。

2. 編集 .env ドメインを次のように設定するには SITE_ROOT: SITE_ROOT=https://yourdomain.com

3. サービスを再構築する:

cd /root/healthchecks/
docker compose up -d

4. Nginx設定を編集し、両方を置換する server_name <IP>; あなたのドメインで (<yourdomain.com>HTTP(ポート80)およびHTTPS(ポート443)ブロックの両方に対して:

vim /etc/nginx/sites-available/healthchecks

5. Certbot のインストール:

apt install -y certbot python3-certbot-nginx

6. 有効なLet's Encrypt証明書を生成するには、次のコマンドを実行します:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

7. Nginx設定ファイル内のSSLパスを置換(TLSセクション):

vim /etc/nginx/sites-available/healthchecks
# Before:
    # ssl_certificate /etc/nginx/ssl/fullchain.pem;
    # ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
    # ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

8. 変更を適用するために Nginx を再起動します:

systemctl restart nginx

9. ブラウザを開き、次のURLにアクセスしてください: https://yourdomain.com

申請内容