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

Jetmon: Dockerize app #8

Merged
merged 8 commits into from Nov 3, 2022
Merged

Jetmon: Dockerize app #8

merged 8 commits into from Nov 3, 2022

Conversation

fgiannar
Copy link
Contributor

@fgiannar fgiannar commented Oct 28, 2022

Second attempt at dockerizing Jetmon after updating repo to node16

Not too fancy or super optimized as for now this is only meant to facilitate local development.

Testing instructions

  1. Checkout branch
  2. cp docker/env-sample docker/env and modify as needed
  3. cd docker
  4. docker compose build
  5. docker compose up -d
  6. Monitor jetmon.log

Helper note to populate the DB (todo automate this):

  1. docker compose exec -it mysqldb sh
  2. mysql --user=root --password=123456 jetmon_db
  3. Create jetpack_monitor_subscription table
CREATE TABLE `jetpack_monitor_subscription` (
		`blog_id` bigint(20) unsigned NOT NULL,
		`bucket_no` smallint(2) unsigned NOT NULL DEFAULT 1,
		`monitor_url` varchar(300) NOT NULL,
		`monitor_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
		`site_status` tinyint(1) unsigned NOT NULL DEFAULT 1,
		`last_status_change` timestamp NULL DEFAULT NULL,
		PRIMARY KEY (`blog_id`)
	);
CREATE INDEX `bucket_no_monitor_active` ON `jetpack_monitor_subscription` (`bucket_no`, `monitor_active`);
  1. Add some sites:
INSERT INTO `jetpack_monitor_subscription`(blog_id,monitor_url) VALUES (YOUR_WPCOM_BLOG_ID, YOUR_SITE_URL);

@darssen darssen mentioned this pull request Oct 28, 2022
@fgiannar fgiannar mentioned this pull request Oct 31, 2022
@fgiannar fgiannar self-assigned this Nov 1, 2022
Copy link
Contributor

@aidvu aidvu left a comment

Choose a reason for hiding this comment

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

Nice job!

@fgiannar fgiannar merged commit e3b9fe0 into master Nov 3, 2022
@fgiannar fgiannar deleted the add/dockerize-app-node-16 branch November 3, 2022 10:24
@fgiannar fgiannar mentioned this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants