Skip to content

Commit 2c64730

Browse files
committed
Don't copy certs to image on build
1 parent 649c4f9 commit 2c64730

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

production/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
certs

production/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ docker run -p 3000:3000 my-temporal-worker
3737

3838
We use [`src/connection.ts`](./src/connection.ts) for connecting to Temporal Server from both the Client and Worker. When connecting to Temporal Server running on our local machine, the defaults (`localhost:7233` for `node lib/worker.js` and `host.docker.internal:7233` for Docker) work. When connecting to a production Temporal Server, we need to:
3939

40-
- Put the TLS certificate in `certs/server.pem`
41-
- Put the TLS private key in `certs/server.key`
4240
- Provide the GRPC endpoint, like `TEMPORAL_SERVER=loren.temporal-dev.tmprl.cloud:7233`
4341
- Provide the namespace, like `NAMESPACE=loren.temporal-dev`
42+
- Put the TLS certificate in `certs/server.pem`
43+
- Put the TLS private key in `certs/server.key`
44+
- If using Docker, mount `certs/` into the container by adding `--mount type=bind,source="$(pwd)"/certs,target=/app/certs` to `docker run`
45+
46+
With Docker, the full commands would be:
47+
48+
```
49+
docker build . --tag my-temporal-worker --build-arg TEMPORAL_SERVER=loren.temporal-dev.tmprl.cloud:7233 --build-arg NAMESPACE=loren.temporal-dev
50+
docker run -p 3000:3000 --mount type=bind,source="$(pwd)"/certs,target=/app/certs my-temporal-worker
51+
```

0 commit comments

Comments
 (0)