mirror of
https://github.com/Sudo-JHare/FHIRFLARE-IG-Toolkit.git
synced 2025-09-17 18:35:02 +00:00
trigger build
This commit is contained in:
parent
ea402ceaa9
commit
1d9a263d23
@ -1,26 +0,0 @@
|
||||
Docker Commands.MD
|
||||
|
||||
|
||||
<HAPI-server.>
|
||||
to pull and clone:
|
||||
git clone https://github.com/hapifhir/hapi-fhir-jpaserver-starter.git hapi-fhir-jpaserver
|
||||
|
||||
to build:
|
||||
mvn clean package -DskipTests=true -Pboot
|
||||
|
||||
to run:
|
||||
java -jar target/ROOT.war
|
||||
|
||||
|
||||
<rest-of-the-app:>
|
||||
|
||||
docker-compose build --no-cache
|
||||
docker-compose up -d
|
||||
|
||||
|
||||
|
||||
<useful-stuff:>
|
||||
|
||||
cp <CONTAINERID>:/app/PATH/Filename.ext . - . copies to the root folder you ran it from
|
||||
|
||||
docker exec -it <CONTAINERID> bash - to get a bash - session in the container -
|
@ -1,11 +0,0 @@
|
||||
FROM flare.lite
|
||||
|
||||
# Ensure /tmp, /app/static/uploads, and /app/logs are writable
|
||||
RUN mkdir -p /tmp /app/h2-data /app/static/uploads /app/logs && chmod 777 /tmp /app/h2-data /app/static/uploads /app/logs
|
||||
|
||||
# Copy pre-built HAPI WAR and configuration
|
||||
COPY hapi-fhir-jpaserver/target/ROOT.war /usr/local/tomcat/webapps/
|
||||
COPY hapi-fhir-jpaserver/target/classes/application.yaml /usr/local/tomcat/conf/
|
||||
COPY hapi-fhir-jpaserver/target/classes/application.yaml /app/config/application.yaml
|
||||
COPY hapi-fhir-jpaserver/target/classes/application.yaml /usr/local/tomcat/webapps/app/config/application.yaml
|
||||
COPY hapi-fhir-jpaserver/custom/ /usr/local/tomcat/webapps/custom/
|
25
Run.bat
25
Run.bat
@ -1,25 +0,0 @@
|
||||
REM --- Step 1: Start Docker containers ---
|
||||
echo ===> Starting Docker containers (Step 7)...
|
||||
docker-compose up -d
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Docker Compose up failed. Check Docker installation and container configurations. ErrorLevel: %errorlevel%
|
||||
goto :error
|
||||
)
|
||||
echo Docker containers started successfully. ErrorLevel: %errorlevel%
|
||||
echo.
|
||||
|
||||
echo ====================================
|
||||
echo Script finished successfully!
|
||||
echo ====================================
|
||||
goto :eof
|
||||
|
||||
:error
|
||||
echo ------------------------------------
|
||||
echo An error occurred. Script aborted.
|
||||
echo ------------------------------------
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:eof
|
||||
echo Script execution finished.
|
||||
pause
|
Binary file not shown.
@ -34,7 +34,7 @@ podAnnotations: {}
|
||||
# runAsUser: 65532
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
|
||||
#
|
||||
# securityContext:
|
||||
# allowPrivilegeEscalation: false
|
||||
# capabilities:
|
||||
|
@ -1,43 +0,0 @@
|
||||
services:
|
||||
fhirflare:
|
||||
image: ghcr.io/jgsuess/fhirflare-ig-toolkit:latest
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- ./instance:/app/instance
|
||||
- ./static/uploads:/app/static/uploads
|
||||
- ./instance/hapi-h2-data/:/app/h2-data # Keep volume mounts consistent
|
||||
- ./logs:/app/logs
|
||||
environment:
|
||||
- FLASK_APP=app.py
|
||||
- FLASK_ENV=development
|
||||
- NODE_PATH=/usr/lib/node_modules
|
||||
- APP_MODE=lite
|
||||
- APP_BASE_URL=http://localhost:5000
|
||||
- HAPI_FHIR_URL=http://fhir:8080/fhir
|
||||
command: supervisord -c /etc/supervisord.conf
|
||||
|
||||
fhir:
|
||||
container_name: hapi
|
||||
image: "hapiproject/hapi:v8.2.0-1"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
configs:
|
||||
- source: hapi
|
||||
target: /app/config/application.yaml
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: "postgres:17.2-bookworm"
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_DB: hapi
|
||||
volumes:
|
||||
- ./hapi.postgress.data:/var/lib/postgresql/data
|
||||
|
||||
configs:
|
||||
hapi:
|
||||
file: ./application.yaml
|
BIN
docker-compose/instance/fhir_ig.db
Normal file
BIN
docker-compose/instance/fhir_ig.db
Normal file
Binary file not shown.
3607
docker-compose/instance/fhirflare_debug.log
Normal file
3607
docker-compose/instance/fhirflare_debug.log
Normal file
File diff suppressed because one or more lines are too long
8
docker-compose/logs/flask.log
Normal file
8
docker-compose/logs/flask.log
Normal file
@ -0,0 +1,8 @@
|
||||
* Serving Flask app 'app'
|
||||
* Debug mode: off
|
||||
* Serving Flask app 'app'
|
||||
* Debug mode: off
|
||||
* Serving Flask app 'app'
|
||||
* Debug mode: off
|
||||
* Serving Flask app 'app'
|
||||
* Debug mode: off
|
3611
docker-compose/logs/flask_err.log
Normal file
3611
docker-compose/logs/flask_err.log
Normal file
File diff suppressed because one or more lines are too long
40
docker-compose/logs/supervisord.log
Normal file
40
docker-compose/logs/supervisord.log
Normal file
@ -0,0 +1,40 @@
|
||||
2025-07-15 02:43:35,572 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2025-07-15 02:43:35,575 INFO supervisord started with pid 1
|
||||
2025-07-15 02:43:36,577 INFO spawned: 'flask' with pid 7
|
||||
2025-07-15 02:43:36,578 INFO spawned: 'tomcat' with pid 8
|
||||
2025-07-15 02:43:46,682 INFO success: flask entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
|
||||
2025-07-15 02:44:07,102 INFO success: tomcat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
|
||||
2025-07-15 03:33:26,668 WARN received SIGTERM indicating exit request
|
||||
2025-07-15 03:33:26,676 INFO waiting for flask, tomcat to die
|
||||
2025-07-15 03:33:26,787 WARN stopped: tomcat (exit status 143)
|
||||
2025-07-15 03:33:26,798 WARN stopped: flask (terminated by SIGTERM)
|
||||
2025-07-15 03:35:53,949 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2025-07-15 03:35:53,950 INFO supervisord started with pid 1
|
||||
2025-07-15 03:35:54,952 INFO spawned: 'flask' with pid 7
|
||||
2025-07-15 03:35:54,954 INFO spawned: 'tomcat' with pid 8
|
||||
2025-07-15 03:36:05,793 INFO success: flask entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
|
||||
2025-07-15 03:36:25,546 INFO success: tomcat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
|
||||
2025-07-15 03:36:32,553 WARN received SIGTERM indicating exit request
|
||||
2025-07-15 03:36:32,555 INFO waiting for flask, tomcat to die
|
||||
2025-07-15 03:36:32,608 WARN stopped: tomcat (exit status 143)
|
||||
2025-07-15 03:36:32,615 WARN stopped: flask (terminated by SIGTERM)
|
||||
2025-07-15 03:36:48,443 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2025-07-15 03:36:48,444 INFO supervisord started with pid 1
|
||||
2025-07-15 03:36:49,446 INFO spawned: 'flask' with pid 7
|
||||
2025-07-15 03:36:49,448 INFO spawned: 'tomcat' with pid 8
|
||||
2025-07-15 03:37:00,401 INFO success: flask entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
|
||||
2025-07-15 03:37:20,421 INFO success: tomcat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
|
||||
2025-07-15 03:41:24,314 WARN received SIGTERM indicating exit request
|
||||
2025-07-15 03:41:24,314 INFO waiting for flask, tomcat to die
|
||||
2025-07-15 03:41:24,355 WARN stopped: tomcat (exit status 143)
|
||||
2025-07-15 03:41:24,371 WARN stopped: flask (terminated by SIGTERM)
|
||||
2025-07-15 03:42:33,879 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2025-07-15 03:42:33,880 INFO supervisord started with pid 1
|
||||
2025-07-15 03:42:34,883 INFO spawned: 'flask' with pid 7
|
||||
2025-07-15 03:42:34,885 INFO spawned: 'tomcat' with pid 8
|
||||
2025-07-15 03:42:44,901 INFO success: flask entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
|
||||
2025-07-15 03:43:04,922 INFO success: tomcat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
|
||||
2025-07-15 04:54:10,136 WARN received SIGTERM indicating exit request
|
||||
2025-07-15 04:54:10,146 INFO waiting for flask, tomcat to die
|
||||
2025-07-15 04:54:10,310 WARN stopped: tomcat (exit status 143)
|
||||
2025-07-15 04:54:10,320 WARN stopped: flask (terminated by SIGTERM)
|
0
docker-compose/logs/tomcat.log
Normal file
0
docker-compose/logs/tomcat.log
Normal file
152
docker-compose/logs/tomcat_err.log
Normal file
152
docker-compose/logs/tomcat_err.log
Normal file
@ -0,0 +1,152 @@
|
||||
15-Jul-2025 02:43:37.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.1.43
|
||||
15-Jul-2025 02:43:37.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 1 2025 21:30:20 UTC
|
||||
15-Jul-2025 02:43:37.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.1.43.0
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.11.0-29-generic
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.15+6
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
|
||||
15-Jul-2025 02:43:37.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
|
||||
15-Jul-2025 02:43:37.049 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
|
||||
15-Jul-2025 02:43:37.049 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.io.useCanonCaches=false
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.050 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.051 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.052 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
|
||||
15-Jul-2025 02:43:37.052 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
|
||||
15-Jul-2025 02:43:37.052 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
|
||||
15-Jul-2025 02:43:37.053 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
|
||||
15-Jul-2025 02:43:37.059 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [2.0.9] using APR version [1.7.2].
|
||||
15-Jul-2025 02:43:37.063 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]
|
||||
15-Jul-2025 02:43:37.283 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 02:43:37.305 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [468] milliseconds
|
||||
15-Jul-2025 02:43:37.354 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
|
||||
15-Jul-2025 02:43:37.354 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.43]
|
||||
15-Jul-2025 02:43:37.370 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 02:43:37.382 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [77] milliseconds
|
||||
15-Jul-2025 03:33:26.694 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:33:26.730 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
|
||||
15-Jul-2025 03:33:26.735 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:33:26.748 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:35:55.373 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.1.43
|
||||
15-Jul-2025 03:35:55.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 1 2025 21:30:20 UTC
|
||||
15-Jul-2025 03:35:55.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.1.43.0
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.11.0-29-generic
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.15+6
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
|
||||
15-Jul-2025 03:35:55.380 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
|
||||
15-Jul-2025 03:35:55.397 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
|
||||
15-Jul-2025 03:35:55.397 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.io.useCanonCaches=false
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.398 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
|
||||
15-Jul-2025 03:35:55.399 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
|
||||
15-Jul-2025 03:35:55.399 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
|
||||
15-Jul-2025 03:35:55.399 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
|
||||
15-Jul-2025 03:35:55.402 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [2.0.9] using APR version [1.7.2].
|
||||
15-Jul-2025 03:35:55.405 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]
|
||||
15-Jul-2025 03:35:55.684 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:35:55.723 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [531] milliseconds
|
||||
15-Jul-2025 03:35:55.782 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
|
||||
15-Jul-2025 03:35:55.782 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.43]
|
||||
15-Jul-2025 03:35:55.804 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:35:55.819 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [96] milliseconds
|
||||
15-Jul-2025 03:36:32.560 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:36:32.570 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
|
||||
15-Jul-2025 03:36:32.571 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:36:32.575 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:36:49.853 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.1.43
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 1 2025 21:30:20 UTC
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.1.43.0
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.11.0-29-generic
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.15+6
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
|
||||
15-Jul-2025 03:36:49.857 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.io.useCanonCaches=false
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.864 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
|
||||
15-Jul-2025 03:36:49.865 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
|
||||
15-Jul-2025 03:36:49.868 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [2.0.9] using APR version [1.7.2].
|
||||
15-Jul-2025 03:36:49.872 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]
|
||||
15-Jul-2025 03:36:50.082 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:36:50.100 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [398] milliseconds
|
||||
15-Jul-2025 03:36:50.141 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
|
||||
15-Jul-2025 03:36:50.141 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.43]
|
||||
15-Jul-2025 03:36:50.154 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:36:50.163 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [62] milliseconds
|
||||
15-Jul-2025 03:41:24.321 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:41:24.328 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
|
||||
15-Jul-2025 03:41:24.329 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:41:24.334 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:42:35.284 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.1.43
|
||||
15-Jul-2025 03:42:35.291 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 1 2025 21:30:20 UTC
|
||||
15-Jul-2025 03:42:35.291 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.1.43.0
|
||||
15-Jul-2025 03:42:35.291 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.11.0-29-generic
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.15+6
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
|
||||
15-Jul-2025 03:42:35.292 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.io.useCanonCaches=false
|
||||
15-Jul-2025 03:42:35.304 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
|
||||
15-Jul-2025 03:42:35.305 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
|
||||
15-Jul-2025 03:42:35.308 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [2.0.9] using APR version [1.7.2].
|
||||
15-Jul-2025 03:42:35.311 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]
|
||||
15-Jul-2025 03:42:35.488 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:42:35.511 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [361] milliseconds
|
||||
15-Jul-2025 03:42:35.562 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
|
||||
15-Jul-2025 03:42:35.562 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.43]
|
||||
15-Jul-2025 03:42:35.581 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 03:42:35.596 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [84] milliseconds
|
||||
15-Jul-2025 04:54:10.164 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 04:54:10.213 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
|
||||
15-Jul-2025 04:54:10.222 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
|
||||
15-Jul-2025 04:54:10.240 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
|
233
setup_linux.sh
233
setup_linux.sh
@ -1,233 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- Configuration ---
|
||||
REPO_URL="https://github.com/hapifhir/hapi-fhir-jpaserver-starter.git"
|
||||
CLONE_DIR="hapi-fhir-jpaserver"
|
||||
SOURCE_CONFIG_DIR="hapi-fhir-Setup" # Assuming this is relative to the script's parent
|
||||
CONFIG_FILE="application.yaml"
|
||||
|
||||
# --- Define Paths ---
|
||||
# Note: Adjust SOURCE_CONFIG_PATH if SOURCE_CONFIG_DIR is not a sibling directory
|
||||
# This assumes the script is run from a directory, and hapi-fhir-setup is at the same level
|
||||
SOURCE_CONFIG_PATH="../${SOURCE_CONFIG_DIR}/target/classes/${CONFIG_FILE}"
|
||||
DEST_CONFIG_PATH="${CLONE_DIR}/target/classes/${CONFIG_FILE}"
|
||||
|
||||
APP_MODE=""
|
||||
|
||||
# --- Error Handling Function ---
|
||||
handle_error() {
|
||||
echo "------------------------------------"
|
||||
echo "An error occurred: $1"
|
||||
echo "Script aborted."
|
||||
echo "------------------------------------"
|
||||
# Removed 'read -p "Press Enter to exit..."' as it's not typical for non-interactive CI/CD
|
||||
exit 1
|
||||
}
|
||||
|
||||
# === Prompt for Installation Mode ===
|
||||
get_mode_choice() {
|
||||
echo "Select Installation Mode:"
|
||||
echo "1. Standalone (Includes local HAPI FHIR Server - Requires Git & Maven)"
|
||||
echo "2. Lite (Excludes local HAPI FHIR Server - No Git/Maven needed)"
|
||||
|
||||
while true; do
|
||||
read -r -p "Enter your choice (1 or 2): " choice
|
||||
case "$choice" in
|
||||
1)
|
||||
APP_MODE="standalone"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
APP_MODE="lite"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Invalid input. Please try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "Selected Mode: $APP_MODE"
|
||||
echo
|
||||
}
|
||||
|
||||
# Call the function to get mode choice
|
||||
get_mode_choice
|
||||
|
||||
# === Conditionally Execute HAPI Setup ===
|
||||
if [ "$APP_MODE" = "standalone" ]; then
|
||||
echo "Running Standalone setup including HAPI FHIR..."
|
||||
echo
|
||||
|
||||
# --- Step 0: Clean up previous clone (optional) ---
|
||||
echo "Checking for existing directory: $CLONE_DIR"
|
||||
if [ -d "$CLONE_DIR" ]; then
|
||||
echo "Found existing directory, removing it..."
|
||||
rm -rf "$CLONE_DIR"
|
||||
if [ $? -ne 0 ]; then
|
||||
handle_error "Failed to remove existing directory: $CLONE_DIR"
|
||||
fi
|
||||
echo "Existing directory removed."
|
||||
else
|
||||
echo "Directory does not exist, proceeding with clone."
|
||||
fi
|
||||
echo
|
||||
|
||||
# --- Step 1: Clone the HAPI FHIR server repository ---
|
||||
echo "Cloning repository: $REPO_URL into $CLONE_DIR..."
|
||||
git clone "$REPO_URL" "$CLONE_DIR"
|
||||
if [ $? -ne 0 ]; then
|
||||
handle_error "Failed to clone repository. Check Git installation and network connection."
|
||||
fi
|
||||
echo "Repository cloned successfully."
|
||||
echo
|
||||
|
||||
# --- Step 2: Navigate into the cloned directory ---
|
||||
echo "Changing directory to $CLONE_DIR..."
|
||||
cd "$CLONE_DIR" || handle_error "Failed to change directory to $CLONE_DIR."
|
||||
echo "Current directory: $(pwd)"
|
||||
echo
|
||||
|
||||
# --- Step 3: Build the HAPI server using Maven ---
|
||||
echo "===> Starting Maven build (Step 3)..."
|
||||
mvn clean package -DskipTests=true -Pboot
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Maven build failed."
|
||||
cd ..
|
||||
handle_error "Maven build process resulted in an error."
|
||||
fi
|
||||
echo "Maven build completed successfully."
|
||||
echo
|
||||
|
||||
# --- Step 4: Copy the configuration file ---
|
||||
echo "===> Starting file copy (Step 4)..."
|
||||
echo "Copying configuration file..."
|
||||
# Corrected SOURCE_CONFIG_PATH to be relative to the new current directory ($CLONE_DIR)
|
||||
# This assumes the original script's SOURCE_CONFIG_PATH was relative to its execution location
|
||||
# If SOURCE_CONFIG_DIR is ../hapi-fhir-setup relative to script's original location:
|
||||
# Then from within CLONE_DIR, it becomes ../../hapi-fhir-setup
|
||||
# We defined SOURCE_CONFIG_PATH earlier relative to the script start.
|
||||
# So, when inside CLONE_DIR, the path from original script location should be used.
|
||||
# The original script had: set SOURCE_CONFIG_PATH=..\%SOURCE_CONFIG_DIR%\target\classes\%CONFIG_FILE%
|
||||
# And then: xcopy "%SOURCE_CONFIG_PATH%" "target\classes\"
|
||||
# This implies SOURCE_CONFIG_PATH is relative to the original script's location, not the $CLONE_DIR
|
||||
# Therefore, we need to construct the correct relative path from *within* $CLONE_DIR back to the source.
|
||||
# Assuming the script is in dir X, and SOURCE_CONFIG_DIR is ../hapi-fhir-setup from X.
|
||||
# So, hapi-fhir-setup is a sibling of X's parent.
|
||||
# If CLONE_DIR is also in X, then from within CLONE_DIR, the path is ../ + original SOURCE_CONFIG_PATH
|
||||
# For simplicity and robustness, let's use an absolute path or a more clearly defined relative path from the start.
|
||||
# The original `SOURCE_CONFIG_PATH=..\%SOURCE_CONFIG_DIR%\target\classes\%CONFIG_FILE%` implies
|
||||
# that `hapi-fhir-setup` is a sibling of the directory where the script *is being run from*.
|
||||
|
||||
# Let's assume the script is run from the root of FHIRFLARE-IG-Toolkit.
|
||||
# And hapi-fhir-setup is also in the root, next to this script.
|
||||
# Then SOURCE_CONFIG_PATH would be ./hapi-fhir-setup/target/classes/application.yaml
|
||||
# And from within ./hapi-fhir-jpaserver/, the path would be ../hapi-fhir-setup/target/classes/application.yaml
|
||||
|
||||
# The original batch file sets SOURCE_CONFIG_PATH as "..\%SOURCE_CONFIG_DIR%\target\classes\%CONFIG_FILE%"
|
||||
# And COPIES it to "target\classes\" *while inside CLONE_DIR*.
|
||||
# This means the source path is relative to where the *cd %CLONE_DIR%* happened from.
|
||||
# Let's make it relative to the script's initial execution directory.
|
||||
INITIAL_SCRIPT_DIR=$(pwd)
|
||||
ABSOLUTE_SOURCE_CONFIG_PATH="${INITIAL_SCRIPT_DIR}/../${SOURCE_CONFIG_DIR}/target/classes/${CONFIG_FILE}" # This matches the ..\ logic
|
||||
|
||||
echo "Source: $ABSOLUTE_SOURCE_CONFIG_PATH"
|
||||
echo "Destination: target/classes/$CONFIG_FILE"
|
||||
|
||||
if [ ! -f "$ABSOLUTE_SOURCE_CONFIG_PATH" ]; then
|
||||
echo "WARNING: Source configuration file not found at $ABSOLUTE_SOURCE_CONFIG_PATH."
|
||||
echo "The script will continue, but the server might use default configuration."
|
||||
else
|
||||
cp "$ABSOLUTE_SOURCE_CONFIG_PATH" "target/classes/"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: Failed to copy configuration file. Check if the source file exists and permissions."
|
||||
echo "The script will continue, but the server might use default configuration."
|
||||
else
|
||||
echo "Configuration file copied successfully."
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
||||
# --- Step 5: Navigate back to the parent directory ---
|
||||
echo "===> Changing directory back (Step 5)..."
|
||||
cd .. || handle_error "Failed to change back to the parent directory."
|
||||
echo "Current directory: $(pwd)"
|
||||
echo
|
||||
|
||||
else # APP_MODE is "lite"
|
||||
echo "Running Lite setup, skipping HAPI FHIR build..."
|
||||
# Ensure the hapi-fhir-jpaserver directory doesn't exist or is empty if Lite mode is chosen
|
||||
if [ -d "$CLONE_DIR" ]; then
|
||||
echo "Found existing HAPI directory ($CLONE_DIR) in Lite mode. Removing it..."
|
||||
rm -rf "$CLONE_DIR"
|
||||
fi
|
||||
# Create empty target directories expected by Dockerfile COPY, even if not used
|
||||
mkdir -p "${CLONE_DIR}/target/classes"
|
||||
mkdir -p "${CLONE_DIR}/custom" # This was in the original batch, ensure it's here
|
||||
# Create a placeholder empty WAR file and application.yaml to satisfy Dockerfile COPY
|
||||
touch "${CLONE_DIR}/target/ROOT.war"
|
||||
touch "${CLONE_DIR}/target/classes/application.yaml"
|
||||
echo "Placeholder files and directories created for Lite mode build in $CLONE_DIR."
|
||||
echo
|
||||
fi
|
||||
|
||||
# === Modify docker-compose.yml to set APP_MODE ===
|
||||
echo "Updating docker-compose.yml with APP_MODE=$APP_MODE..."
|
||||
DOCKER_COMPOSE_TMP="docker-compose.yml.tmp"
|
||||
DOCKER_COMPOSE_ORIG="docker-compose.yml"
|
||||
|
||||
cat << EOF > "$DOCKER_COMPOSE_TMP"
|
||||
version: '3.8'
|
||||
services:
|
||||
fhirflare:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "8080:8080" # Keep port exposed, even if Tomcat isn't running useful stuff in Lite
|
||||
volumes:
|
||||
- ./instance:/app/instance
|
||||
- ./static/uploads:/app/static/uploads
|
||||
- ./instance/hapi-h2-data/:/app/h2-data # Keep volume mounts consistent
|
||||
- ./logs:/app/logs
|
||||
environment:
|
||||
- FLASK_APP=app.py
|
||||
- FLASK_ENV=development
|
||||
- NODE_PATH=/usr/lib/node_modules
|
||||
- APP_MODE=${APP_MODE}
|
||||
- APP_BASE_URL=http://localhost:5000
|
||||
- HAPI_FHIR_URL=http://localhost:8080/fhir
|
||||
command: supervisord -c /etc/supervisord.conf
|
||||
EOF
|
||||
|
||||
if [ ! -f "$DOCKER_COMPOSE_TMP" ]; then
|
||||
handle_error "Failed to create temporary docker-compose file ($DOCKER_COMPOSE_TMP)."
|
||||
fi
|
||||
|
||||
# Replace the original docker-compose.yml
|
||||
mv "$DOCKER_COMPOSE_TMP" "$DOCKER_COMPOSE_ORIG"
|
||||
echo "docker-compose.yml updated successfully."
|
||||
echo
|
||||
|
||||
# --- Step 6: Build Docker images ---
|
||||
echo "===> Starting Docker build (Step 6)..."
|
||||
docker-compose build --no-cache
|
||||
if [ $? -ne 0 ]; then
|
||||
handle_error "Docker Compose build failed. Check Docker installation and docker-compose.yml file."
|
||||
fi
|
||||
echo "Docker images built successfully."
|
||||
echo
|
||||
|
||||
# --- Step 7: Start Docker containers ---
|
||||
echo "===> Starting Docker containers (Step 7)..."
|
||||
docker-compose up -d
|
||||
if [ $? -ne 0 ]; then
|
||||
handle_error "Docker Compose up failed. Check Docker installation and container configurations."
|
||||
fi
|
||||
echo "Docker containers started successfully."
|
||||
echo
|
||||
|
||||
echo "===================================="
|
||||
echo "Script finished successfully! (Mode: $APP_MODE)"
|
||||
echo "===================================="
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user