Skip to content

Commit

Permalink
switch gateway to localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Jun 30, 2024
1 parent 8d47ec4 commit 6a92cce
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.history
venv*
.venv*
*workspace
44 changes: 32 additions & 12 deletions services/gateway/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@

services:

ca-gateway:
# ca-gateway for development #################################################

ca-gateway-develop: &ca-gateway

image: docker.io/pklaus/ca-gateway
container_name: ca-gateway

expose:
- "5064-5065/udp"
- "5064-5065"
- 5064-5065/udp
- 5064-5065

ports:
- "5064:5064/udp"
- "5064-5065:5064-5065"
# bind to localhost to isolate channel access to this host only
- 127.0.0.1:5064:5064/udp
- 127.0.0.1:5064-5065:5064-5065

restart: unless-stopped

networks:
channel_access:
ipv4_address: 172.20.255.254
Expand All @@ -26,14 +33,27 @@ services:
- source: ca-gateway_config
target: /config

# using sip of localhost for isolation but that's not working with podman
command: -sip 127.0.0.1 -cip 172.20.255.255 -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug 1
command: -cip 172.20.255.255 -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug 1

profiles:
- develop

# per server ca-gateway for deployment #######################################
ca-gateway-deploy:

<<: *ca-gateway

ports:
# TODO - drop the IP address but also set up pvlist to make sure there
# are no loops - I need to look into safe config for per server ca-gateways
- 127.0.0.1:5064:5064/udp
- 127.0.0.1:5064-5065:5064-5065

command: -cip 172.20.255.255 -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug 1

profiles:
# only deploy explicitly. TODO understand better how to configure with
# podman
- gateway
- deploy

configs:
ca-gateway_config:
file: ./config
file: ./config

0 comments on commit 6a92cce

Please sign in to comment.