diff --git a/Dockerfile.dev b/Dockerfile.dev index c470dee54..b96b0b500 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -37,7 +37,8 @@ RUN mkdir -p /etc/cron.d && mv /app/setup_utils/cronjob.txt /etc/cron.d/cronjob RUN chmod +x /app/setup_utils/start.sh /app/setup_utils/init_db.sh /app/setup_utils/generate_config_ini.sh RUN mv /app/setup_utils/supervisord.conf /etc/supervisord.conf RUN mv /app/database-docker/db/ /app/ && rm -rf /app/database-docker/ -RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf +RUN echo "host all all 127.0.0.1/32 md5" >> /etc/postgresql/15/main/pg_hba.conf +RUN echo "host all all 192.168.65.1/32 md5" >> /etc/postgresql/15/main/pg_hba.conf RUN echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf RUN sed -i "s/^port = .*/port = ${DB_PORT}/" /etc/postgresql/15/main/postgresql.conf RUN npm install --global yarn --force diff --git a/cli/source/constants.ts b/cli/source/constants.ts index 0ab054083..1e7eb07da 100644 --- a/cli/source/constants.ts +++ b/cli/source/constants.ts @@ -54,8 +54,8 @@ export const keysForLogSource = Object.entries(LogSource).reduce( ); export const READY_MESSAGES = { - [LogSource.ApiServer]: `Listening at: http://0.0.0.0`, - [LogSource.SyncServer]: `Listening at: http://0.0.0.0`, + [LogSource.ApiServer]: `Listening at: http://127.0.0.1`, + [LogSource.SyncServer]: `Listening at: http://127.0.0.1`, [LogSource.WebServer]: [ `Server started on http://localhost`, `http://localhost:` diff --git a/setup_utils/start_api_server.sh b/setup_utils/start_api_server.sh index 76ba56a11..ec7417469 100644 --- a/setup_utils/start_api_server.sh +++ b/setup_utils/start_api_server.sh @@ -21,7 +21,7 @@ wait_for_message cd /app/backend/analytics_server || exit if [ "$ENVIRONMENT" == "prod" ]; then - /opt/venv/bin/gunicorn -w 4 -b 0.0.0.0:$API_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' app:app + /opt/venv/bin/gunicorn -w 4 -b 127.0.0.1:$API_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' app:app else - /opt/venv/bin/gunicorn -w 4 -b 0.0.0.0:$API_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' --reload app:app + /opt/venv/bin/gunicorn -w 4 -b 127.0.0.1:$API_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' --reload app:app fi diff --git a/setup_utils/start_sync_server.sh b/setup_utils/start_sync_server.sh index 0550832b7..a14df6b11 100644 --- a/setup_utils/start_sync_server.sh +++ b/setup_utils/start_sync_server.sh @@ -21,7 +21,7 @@ wait_for_message cd /app/backend/analytics_server || exit if [ "$ENVIRONMENT" == "prod" ]; then - /opt/venv/bin/gunicorn -w 2 -b 0.0.0.0:$SYNC_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' sync_app:app + /opt/venv/bin/gunicorn -w 2 -b 127.0.0.1:$SYNC_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' sync_app:app else - /opt/venv/bin/gunicorn -w 2 -b 0.0.0.0:$SYNC_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' --reload sync_app:app + /opt/venv/bin/gunicorn -w 2 -b 127.0.0.1:$SYNC_SERVER_PORT --timeout 0 --access-logfile '-' --error-logfile '-' --reload sync_app:app fi