React-Automation-Studio / React-Automation-Studio-Alarm-Handler-Standalone

Other
2 stars 0 forks source link

How to access running applications? #3

Open beauremus opened 3 years ago

beauremus commented 3 years ago

I have successfully installed and am running using docker-compose -f docker-compose-prod-with-demoioc.yml up --build but it doesn't appear that this compose file exposes any ports to the host machine. What is the intent here? It looks like the dev version exposes port, but I'd like to understand what the use of the production version is. Thanks.

justinabraham commented 3 years ago

Hi @beauremus, the production version is served through nginx. You'll see the default port (if not specified) is 5000.

beauremus commented 3 years ago

I understand that the default port is 5000. I tried it on my host machine and it didn't work. I double-checked just now in case I missed something the first time. Port 5000 needs to be exposed to the host, no?

justinabraham commented 3 years ago

The port is exposed - see here

Also the network mode is set to host so port mapping is irrelevant.

Can you post your .env file configuration - maybe I'm missing something

beauremus commented 3 years ago
#.env file
REACT_APP_EnableLogin=true
SERVER_PORT=5000

# HTTPS settings ##
# SECURE=true
# HTTP_REDIRECT_TO_HTTPS=true

# AD authentication settings ##
# REACT_APP_EnableActiveDirectoryLogin=true
# LDAP_HOST=ldap://
# LDAP_PORT=389

# Google authentication settings ##
# REACT_APP_EnableGoogleLogin=true
# REACT_APP_EnableGoogleLoginId=

## Mongo Database settings ##
#############################

# Replica set setup
# Defaults to values shown below if not defined
REPLICA_SET_NAME=devrs
REPLICA_SET_MEMBERS=localhost:27017,localhost:27018,localhost:27019

##  Alarm Handler settings ##
#############################

# Mongodb alarm database hostname and replica set name
# Defaults to values shown below if not defined
ALARM_DATABASE=localhost
ALARM_DATABASE_REPLICA_SET_NAME=devrs

# Mongodb alarm database name
# Defaults to demoAlarmDatabase if not defined
MONGO_INITDB_ALARM_DATABASE=demoAlarmDatabase

# Print debug information to terminal
# Defaults to false if not defined
AH_DEBUG=false

# Time zone setting for alarm handler server
# This is used when dates are formatted to strings for notification
# Set as per https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Defaults to Etc/UTC Canonical +00:00 if not defined
AH_TZ=Etc/UTC

# Alarm notification email settings ##
# SMTP_HOST=
# SMTP_PORT=
# SMTP_SENDER=
# Optional if SMTP login required
# SMTP_USER=
# SMTP_PASS=

# Alarm notification Signal settings ##
# SIGNAL_ACC_NUMBER=
# SIGNAL_CLI_REST_API_PORT=
beauremus commented 3 years ago

I've found some more evidence that this isn't working as expected. I'm investigating how to make this work. Screen Shot 2021-07-15 at 12 20 00 PM Screen Shot 2021-07-15 at 12 20 06 PM

beauremus commented 3 years ago

Forget my previous post. Because this is configured for host network I don't think a port needs to be bound.