Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add a datapump #4

Open
white-gecko opened this issue Apr 22, 2020 · 1 comment
Open

Add a datapump #4

white-gecko opened this issue Apr 22, 2020 · 1 comment

Comments

@white-gecko
Copy link
Member

white-gecko commented Apr 22, 2020

The setup needs a "datapump" to initially load data into the virtuoso from a git repository and to regularly or on update dump the changes to the git repository.

I could be integrated like that into the docker-compose file

  datapump:
    image: datapump
    container_name: pfarrerbuch_datapump
    environment:
    volumes:
      - /data/pfarrerbuch/models:/models
    links:
      - virtuoso

Maybe this is a candidate: https://github.com/Dockerizing/virtuoso-import-docker

@TBoonX
Copy link
Contributor

TBoonX commented Jun 4, 2020

With commit 2398f97 of virtuoso-import-docker you just need to add something like the following to your docker-compose file:

import:
        build: /path/to/repo
        command: /virtuoso/git_import.sh
        environment:
            DBA_PASSWORD: ${DBA_PASSWORD}
            VIRTUOSO_DATA_DIR: /virtuoso/data
            GIT_REPO: ${GIT_REPO}
            GRAPH_URI: ${GRAPH_URI}
            GIT_DIRECTORY: /virtuoso/git
            GIT_EMAIL: ${GIT_EMAIL}
            GIT_NAME: ${GIT_NAME}
        volumes:
            - files:/virtuoso/data
            - ./id_rsa:/root/.ssh/id_rsa
            - ./config:/root/.ssh/config

updater:
        build: /path/to/repo
        environment:
            DBA_PASSWORD: ${DBA_PASSWORD}
            VIRTUOSO_DATA_DIR: /virtuoso/data
            GIT_REPO: ${GIT_REPO}
            GRAPH_URI: ${GRAPH_URI}
            GIT_DIRECTORY: /virtuoso/git
            GIT_EMAIL: ${GIT_EMAIL}
            GIT_NAME: ${GIT_NAME}
            CRON_JOB: update
        volumes:
            - files:/virtuoso/data
            - ./id_rsa:/root/.ssh/id_rsa
            - ./config:/root/.ssh/config

In order to make sure the updater starts after import was finished, you need to use your own script or start the import by hand before the updater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants