The purpose of a deployment diagram is to allow engineers to understand how your system interacts with infrastructure. It does that by explaining two crucial relationships:
- How components are materialized by artifacts
- Where each artifacts are deployed on nodes
You can usually also use the deployment diagram to explain which nodes need to communicate together, and what protocols they use.
Component materialization
In your diagram, components should not be in nodes. A component is a logical concept, that is used to describe the topology of your application. A node is an infrastructure concept. They cannot interact together directly, they need an intermediate which is an artifact. An artifact is a physical part of your system, that materialize (= implements) a component. Most of the time, the artifact is the binary produced by the compilation of the source code of the component. Sometimes, the mapping is not straightforward and the deployment diagram helps to explain how this mapping works.
Artifact deployments
Artifacts are physical components that are deployed (= copied / placed) on nodes. Artifacts include a description of their expected behavior understandable by the node they are deployed on. The node, which is a bag of physical resources, will execute the artifacts that are deployed on them and follow the behavior it describes. Most of the time, the node does not execute the artifact directly but relies on an execution environment: operating system, virtual machine, runtime, interpreter, ... Execution environment can nest, especially if you have a lot of virtualization: IAAS, VM, containers, kubernetes, application runtimes, ...
Deployment diagram
Here is an example of deployment diagram of your solution:

Keep in mind that there is no absolute answer regarding deployment diagrams. You can have different level of details, depending on what you want to achieve with the diagram. Here I made a focus on communication between nodes, I could have made another one with communication at artifact level, or execution environment level. Also I made a very coarse description of the component level topology for simplicity reasons.
Why node is not an artefact
Node is a specific case, because it is an interpreter. the source code is interpreted and not compiled into a binary. The source code acts as an artifact. The source code is read and executed by node just like a compiled C program would be read and executed by the operating system. This is why source code are artifacts (and not a component) and node is an execution environment (and not an artifact).
Differences with the component diagram
People may find the deployment diagram redundant with the component diagram. The deployment diagram is more recent, but also the deployment diagram serves a different purpose from the deployment diagram. The component diagram describes the logical topology of your information system. It determines the limits of responsibility regarding features and people. People reading your deployment diagrams should be able to understand what are all the contents of your deployment package, and how to deploy them on the infrastructure.