diff --git a/.gitignore b/.gitignore index c4fd18c7..804aa309 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ mergekemain.sh /htdocs/.env # Ignore bootstrap cache /htdocs/bootstrap/cache/* +/htdocs/listenerlis/listener.log + !/htdocs/bootstrap/cache/.gitignore diff --git a/htdocs/Dockerfile b/htdocs/Dockerfile index e0e24c48..fc749ced 100644 --- a/htdocs/Dockerfile +++ b/htdocs/Dockerfile @@ -23,6 +23,7 @@ RUN apt-get update && apt-get install -y \ libtool \ libsqlite3-dev \ mariadb-client \ + libpq-dev \ && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ dom \ @@ -38,6 +39,8 @@ RUN apt-get update && apt-get install -y \ pcntl \ pdo_mysql \ pdo_sqlite \ + pdo_pgsql \ + pgsql \ posix \ shmop \ simplexml \ @@ -60,7 +63,7 @@ WORKDIR /var/www/html # RUN composer create-project laravel/laravel:^10 /var/www/html # Set permission -# RUN chown -R www-data:www-data /var/www/html/htdocs/storage /var/www/html/htdocs/bootstrap/cache +RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache EXPOSE 9000 #CMD ["php-fpm"] diff --git a/htdocs/listenerlis/app.py b/htdocs/listenerlis/app.py index 63b08b7c..2ba0d190 100644 --- a/htdocs/listenerlis/app.py +++ b/htdocs/listenerlis/app.py @@ -19,7 +19,7 @@ logging.basicConfig( app = Flask(__name__) # Konfigurasi Database dengan SQLAlchemy -DATABASE_URL = "postgresql://lismikro:lismikro@postgresql:5432/lismikro" +DATABASE_URL = "postgresql://lismikro:guR8uchQhQFAGi4yXfHPrF2AHTgN15sOViDL7tu0bfoiPmdI@postgresql:5432/lismikro" engine = create_engine(DATABASE_URL) SessionLocal = sessionmaker(bind=engine) for i in range(10): @@ -185,6 +185,6 @@ if __name__ == "__main__": threading.Thread(target=listen_on_port, args=(6001,), daemon=True).start() # Jalankan Flask untuk menerima HTTP POST - app.run(host='10.10.123.218', port=5000, debug=True) + app.run(host='0.0.0.0', port=5000, debug=True) except KeyboardInterrupt: logging.info("Application stopped by user.") diff --git a/htdocs/listenerlis/listener.log b/htdocs/listenerlis/listener.log index dc9aa017..27562d4f 100644 --- a/htdocs/listenerlis/listener.log +++ b/htdocs/listenerlis/listener.log @@ -1548,3 +1548,45 @@ OBR|||1|TEST123^Exa 2025-01-24 08:15:54,435 - INFO - Data is not in HL7 or ASTM format, skipping. 2025-01-24 11:47:47,313 - INFO - New connection from ('10.10.120.13', 54104) 2025-01-24 11:47:47,313 - INFO - Handling client from ('10.10.120.13', 54104) +2025-07-17 00:18:48,302 - INFO - Listening on TCP port 6001... +2025-07-17 00:18:50,828 - INFO - Listening on TCP port 6001... +2025-07-17 00:18:52,964 - INFO - Listening on TCP port 6001... +2025-07-17 00:18:55,171 - INFO - Listening on TCP port 6001... +2025-07-17 00:18:58,412 - INFO - Listening on TCP port 6001... +2025-07-17 00:19:03,971 - INFO - Listening on TCP port 6001... +2025-07-17 00:19:12,311 - INFO - Listening on TCP port 6001... +2025-07-17 00:19:27,600 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:10,491 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:13,968 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:17,049 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:20,457 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:23,453 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:26,802 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:31,975 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:40,787 - INFO - Listening on TCP port 6001... +2025-07-17 00:20:56,867 - INFO - Listening on TCP port 6001... +2025-07-17 00:21:25,278 - INFO - Listening on TCP port 6001... +2025-07-17 00:22:20,552 - INFO - Listening on TCP port 6001... +2025-07-17 00:23:23,402 - INFO - Listening on TCP port 6001... +2025-07-17 00:24:26,166 - INFO - Listening on TCP port 6001... +2025-07-17 00:25:28,435 - INFO - Listening on TCP port 6001... +2025-07-17 00:26:30,664 - INFO - Listening on TCP port 6001... +2025-07-17 00:26:30,699 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:5000 + * Running on http://172.18.0.4:5000 +2025-07-17 00:26:30,700 - INFO - Press CTRL+C to quit +2025-07-17 00:26:30,704 - INFO - * Restarting with stat +2025-07-17 00:26:32,625 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use +2025-07-17 00:26:32,654 - WARNING - * Debugger is active! +2025-07-17 00:26:32,657 - INFO - * Debugger PIN: 951-713-775 +2025-07-17 00:27:38,154 - INFO - Listening on TCP port 6001... +2025-07-17 00:27:38,357 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:5000 + * Running on http://172.18.0.4:5000 +2025-07-17 00:27:38,358 - INFO - Press CTRL+C to quit +2025-07-17 00:27:38,360 - INFO - * Restarting with stat +2025-07-17 00:27:40,799 - ERROR - Failed to bind to port 6001: [Errno 98] Address already in use +2025-07-17 00:27:40,825 - WARNING - * Debugger is active! +2025-07-17 00:27:40,826 - INFO - * Debugger PIN: 139-464-079