The violation alleged by ESLint:
> 'Routes' is assigned a value but never used.eslint(no-unused-vars)
The ESLint rule:
The screenshot of the ESLint violation:
React SFC 'Routes' is assigned a value but never used.eslint(no-unused-vars).The
proof that it's being used:
The Routes SFC is being used above.And a complaint about this issue and
suggested solutions in Github:
The solution I used:
Use the hWith this newest release of VSC [https://code.visualstudio.com/updates/v1_37],
Microsoft has been kind enough to include three tutorials on how to bring VSC's
remote development capabilities to bear. You get three flavors:
* SSH [https://code.visualstudio.com/remote-tutorials/ssh/getting-started]
* WSL [https://code.visualstudio.com/remote-tutorials/wsl/getting-started]
(Windows Subsystem for Linux)
* Docker Containers
[https://code.visualstudio.com/remote-tutorials/containers/gettingThere's been some
appearing as of lately on medium.com and other blogs extolling the virtues of
multi-stage builds in Docker, a feature that was not available as of 3 years ago
(a long time in development).
So since I spend a lot of time rebuilding my own images, I decided to give this
staged build methodology a try. I'm happy toOn this very short post I'm going to be mentioning some of the tools you can use
to make your Dockerfile s better:
* su-exec [https://github.com/ncopa/su-exec]: Switch user and group id,
setgroups and exec.
* dumb-init [https://github.com/Yelp/dumb-init]: Process supervisor and init
system designed to run as PID 1 in containers.
* yarn info [https://yarnpkg.com/en/docs/cli/info]: Show information about a
* jq [https://stedolan.github.io/jq/]: A lightweight and flexible coI am planning on using Kubernetes and Cert Manager along with Docker for Desktop
locally for development.
Cert Manager provides a "staging" certificate authority that creates free,
"fake" certificates using Let's Encrypt for development purposes.
The reason for using the staging certificates as opposed to the production
certificates is that the production certificate authority 1) takes longer to
provision certificates, and; 2) is rate limited
[https://letsencrypt.org/docs/rate-limits/]; 3) youIt's 2019, and Docker for Desktop comes with local Kubernetes support enabled
out of the box.
This post is about setting up a local Kubernetes development environment using
Docker for Desktop.
This Git repo contains the files used in this blog post:
Let's make sure Kubertes is running with kubectl get pods -n kube-system.
NAME Thursday, June 6, 2019
Here's the current state of my blog infrastructure:
* Digital Ocean Kubernetes --> Hosts Ghost backend in a Docker container
* Netlify --> Hosts Gatsby static site generator, and builds html, .css, and
.js static assets, but not the images, those are still served directly from
Ghost on DO. Gatsby uses Ghost as the source for it's content.
* Cloudfare -> Hosts cached images. Cloudfare is a reverse proxy that
automatically caches images, as well as other staticAlso, attacker might be able to see the images you're looking at on this site
and trick you by modifying them.
Also, you must construct additional (HTTPS) pylons.Trick me, you say ? Sounds
like something like an evil clown might try to do:
Scary right? Upon closer inspection, it does look like Ghost/Gatsby are
rendering image elements with http:// instead of https://. That's not good.
HTTP on an HTTPS site: this is no bueno.I decided to check some of Ghost/Gatsby
configs, and did find that tTL;DR: I got HTTPS working.
This is where I left off on last post:
Certificate issuance in progress. Temporary certificate issued.So after waiting
for at least three hours, the message was still the same: "Certificate issuance
in progress. Temporary certificate issued."
On the events section, kubectl describe certificate letsencrypt-prod showed:
Type Reason Age From Message
---- ------ ---- ---- -------
NAs I was explaining on my previous post ...
I was setting up SSL/TLS for HTTPS on my new blog, callbackinsanity.com.
Before going driving home I decided to publish to my CDN, Netlify, because why
not. I wanted to see my first blog post.
Since I have a temporary, fake HTTPS certificate running on the backend service,
I got this beauty on Netlify:
Well, let's check the Netlify deployment logs!!
> ERROR: UNABLE TO VERIFY THE FIRST CERTIFICATE
Cool. Could it be related to the fact that we havPreviously this week ...
While working on the Digital Ocean Kubernetes, I set up a native load balancer
service to serve the Ghost CMS. Whenever a Kubernetes service has spec.type:
LoadBalancer, it automatically creates an actual virtual Load Balancer on DO
Here's the manifest:
- name: ghost-backend
targetPortest remote to local gatsby integration
testing locally OSX on 0.0.0.0:8000 - working!