Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Persist Fasten Database using volume mount #237

Closed
Cookie-Monster-Coder opened this issue Aug 18, 2023 · 4 comments
Closed

Persist Fasten Database using volume mount #237

Cookie-Monster-Coder opened this issue Aug 18, 2023 · 4 comments

Comments

@Cookie-Monster-Coder
Copy link

Have the option to store the data persistently by mapping it in the volume section in docker.

  Fasten:
    image: ghcr.io/fastenhealth/fasten-onprem:main
    container_name: Fasten
    environment:
      - TZ=America/Chicago
    volumes:
      - /volume1/docker/Fasten:/opt/fasten
    ports:
      - 8080:8080
    restart: unless-stopped
@OhHeyAlan
Copy link
Contributor

I tried to submit a PR yesterday to add a docker-compose file with a volume but I shouldn’t submit it w/o merging lots of other changes. I’ll submit one that’s simple for anyone to use later.

@OhHeyAlan
Copy link
Contributor

Maybe its better to just post in a comment for now....

'docker-compose up -d'

http://localhost:9090

version: '3.4'
services:
fasten:
image: ghcr.io/fastenhealth/fasten-onprem:main
container_name: fasten
restart: unless-stopped
ports:
- 9090:8080
volumes:
- ./fasten:/opt/fasten/db/ #Creates '/fasten/fasten.db' within the folder containing the docker-compose.yml file.

@AnalogJ
Copy link
Member

AnalogJ commented Aug 18, 2023

Hey @Cookie-Monster-Coder

This is actually intentional.
Fasten is early beta software and I expect the application functionality and database structure to change significantly as we iterate on the software.
Until we implement a database migration tool, I can't guarantee that the database structure will work between versions, and so I've attempted to side-step this problem by not explicitly documenting how to persist the Fasten database outside of the container (yet).

Once that database migration tool is written, and we release a v1 of Fasten (which is guaranteed to be backwards compatible), these instructions will be baked into the README.

I hope that makes sense?

@AnalogJ AnalogJ changed the title Add volume path for docker to store data. Persist Fasten Database using volume mount Aug 18, 2023
@AnalogJ
Copy link
Member

AnalogJ commented Aug 28, 2024

closing this issue, since volume mount instructions have been included in the Readme for a while.

@AnalogJ AnalogJ closed this as completed Aug 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants