feat: use ephemeral volumes and variable image

* use ephemeral volumes to avoid root mounts in user space
* use image definition using environment variable with default.
This commit is contained in:
Jörn Guy Süß 2025-08-04 12:30:39 +10:00
parent 8df84579a8
commit d547ca12a1
8 changed files with 81 additions and 11 deletions

View File

@ -1,13 +1,22 @@
# This docker-compose file uses ephemeral Docker named volumes for all data storage.
# These volumes persist only as long as the Docker volumes exist and are deleted if you run `docker-compose down -v`.
# No data is stored on the host filesystem. If you want persistent storage, replace these with host mounts.
services:
fhirflare-standalone:
image: ghcr.io/sudo-jhare/fhirflare-ig-toolkit-standalone:latest
image: ${FHIRFLARE_IMAGE:-ghcr.io/sudo-jhare/fhirflare-ig-toolkit-standalone:latest}
container_name: fhirflare-standalone
ports:
- "5000:5000"
- "8080:8080"
volumes:
- ./instance:/app/instance
- ./static/uploads:/app/static/uploads
- ./instance/hapi-h2-data:/app/h2-data
- ./logs:/app/logs
restart: unless-stopped
- fhirflare-instance:/app/instance
- fhirflare-uploads:/app/static/uploads
- fhirflare-h2-data:/app/h2-data
- fhirflare-logs:/app/logs
restart: unless-stopped
volumes:
fhirflare-instance:
fhirflare-uploads:
fhirflare-h2-data:
fhirflare-logs:

View File

@ -1,13 +1,14 @@
services:
fhirflare:
image: ghcr.io/sudo-jhare/fhirflare-ig-toolkit-lite:latest
image: ${FHIRFLARE_IMAGE:-ghcr.io/sudo-jhare/fhirflare-ig-toolkit-lite:latest}
ports:
- "5000:5000"
# Ephemeral Docker named volumes for all data storage. No data is stored on the host filesystem.
volumes:
- ./instance:/app/instance
- ./static/uploads:/app/static/uploads
- ./instance/hapi-h2-data/:/app/h2-data # Keep volume mounts consistent
- ./logs:/app/logs
- fhirflare-instance:/app/instance
- fhirflare-uploads:/app/static/uploads
- fhirflare-h2-data:/app/h2-data
- fhirflare-logs:/app/logs
environment:
- FLASK_APP=app.py
- FLASK_ENV=development
@ -41,3 +42,9 @@ services:
configs:
hapi:
file: ./application.yaml
volumes:
fhirflare-instance:
fhirflare-uploads:
fhirflare-h2-data:
fhirflare-logs:

View File

@ -0,0 +1,25 @@
services:
fhirflare:
image: ${FHIRFLARE_IMAGE:-ghcr.io/sudo-jhare/fhirflare-ig-toolkit-lite:latest}
ports:
- "5000:5000"
# Ephemeral Docker named volumes for all data storage. No data is stored on the host filesystem.
volumes:
- fhirflare-instance:/app/instance
- fhirflare-uploads:/app/static/uploads
- fhirflare-h2-data:/app/h2-data
- fhirflare-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=https://cdr.fhirlab.net/fhir
command: supervisord -c /etc/supervisord.conf
volumes:
fhirflare-instance:
fhirflare-uploads:
fhirflare-h2-data:
fhirflare-logs:

View File

@ -0,0 +1,5 @@
#!/bin/bash
# Stop and remove all containers defined in the Docker Compose file,
# along with any anonymous volumes attached to them.
docker compose down --volumes

View File

@ -0,0 +1,19 @@
# FHIRFLARE IG Toolkit
This directory provides scripts and configuration to start and stop a FHIRFLARE instance with an attached HAPI FHIR server using Docker Compose.
## Usage
- To start the FHIRFLARE toolkit and HAPI server:
```sh
./docker-compose/up.sh
```
- To stop and remove the containers and volumes:
```sh
./docker-compose/down.sh
```
The web interface will be available at [http://localhost:5000](http://localhost:5000) and the HAPI FHIR server at [http://localhost:8080/fhir](http://localhost:8080/fhir).
For more details, see the configuration files in this directory.

View File

@ -0,0 +1,5 @@
#!/bin/bash
# Run Docker Compose
docker compose up --detach --force-recreate --renew-anon-volumes --always-recreate-deps