fix(docker): changed compose example to include external ip stuff to reach devices

This commit is contained in:
2025-09-02 17:55:17 -05:00
parent 083f38a079
commit 8fe1bcaef5
3 changed files with 36 additions and 1 deletions

View File

@@ -25,5 +25,13 @@ PROD_PLANT_TOKEN=test3
PROD_USER=alplaprod
PROD_PASSWORD=password
# Docker Related
PROD_IP=10.193.0.56
LOGISTICS_NETWORK=10.193.14.0/24
LOGISTICS_GATEWAY=10.193.14.252
MLAN1_NETWORK=192.168.193.0/24
MLAN1_GATEWAY=192.168.193.252
# admin
WEBHOOK_URL

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ app/src/frontend
lstWrapper/bin
lstWrapper/obj
lstWrapper/publish
testScripts
# Logs
logs
*.log

View File

@@ -8,7 +8,7 @@ services:
- "${VITE_PORT:-4200}:4200"
environment:
- NODE_ENV=devolpment
- DATABASE_HOST=${DATABASE_HOST}
- DATABASE_HOST=host.docker.internal
- DATABASE_PORT=${DATABASE_PORT}
- DATABASE_USER=${DATABASE_USER}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
@@ -18,3 +18,29 @@ services:
- PROD_USER=${PROD_USER}
- PROD_PASSWORD=${PROD_PASSWORD}
restart: unless-stopped
# for all host including prod servers, plc's, printers, or other de
extra_hosts:
- "${PROD_SERVER}:${PROD_IP}"
networks:
- default
- logisticsNetwork
- mlan1
networks:
logisticsNetwork:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: ${LOGISTICS_NETWORK}
gateway: ${LOGISTICS_GATEWAY}
mlan1:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: ${MLAN1_NETWORK}
gateway: ${MLAN1_GATEWAY}