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

git repo stack and file bind mounts #291

Open
june012006 opened this issue Feb 4, 2025 · 2 comments
Open

git repo stack and file bind mounts #291

june012006 opened this issue Feb 4, 2025 · 2 comments
Labels
setup Help with setting up Komodo

Comments

@june012006
Copy link

I am trying to set up a stack for hashicorp vault, though that isn't strictly important to the issue I'm having.
I'm using a git repo, set up in the "Repos" section (actually, it's in a resource sync, of the same). I'm using the path /etc/komodo/repos to set up the stack, also with a resource sync. That part works fine. However, the volume declaration for the config file, ./config.hcl:/vault/config/config.hcl:ro does not work, and when I start, it creates a directory by that name in the container. If I start the compose file outside of periphery, it works as intended.

version: '3.1' services: vault: image: hashicorp/vault:1.18 container_name: vault networks: - proxy ports: #- "8200:8200" # Change this to the following if you have reverse proxy setup - "127.0.0.1:8200:8200" labels: - <irrelevant traefik labels> volumes: - ./config.hcl:/vault/config/config.hcl:ro - <working path not relevant>:/vault/data cap_add: - IPC_LOCK command: server environment: - TZ=America/Chicago restart: always networks: proxy: external: true

`[[repo]]
name = "hvault"
description = "test"
tags = ["GitHub","Infrastructure"]
[repo.config]
server = "server-s00xe"
builder = "local"
git_account = ""
repo = ""

[[stack]]
name = "git-vault"
tags = ["git", "Infrastructure","GitHub"]
[stack.config]
server = "server-s00xe"
files_on_host = true
run_directory = "/etc/komodo/repos/hvault"
file_paths = ["docker-compose.yaml"]`

The repository for the compose file is just the compose, the readme.md and the config.hcl file.

@unsync
Copy link

unsync commented Feb 7, 2025

Are you running periphery with docker ?

Maybe this is related to these (please read them before checking my last comment ^^):

#260
#180

Comes down to this periphery setup :

    volumes:
      - ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}:${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}
    environment:
      PERIPHERY_ROOT_DIRECTORY: /data/periphery
      PERIPHERY_REPO_DIR: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/repos
      PERIPHERY_STACK_DIR: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/stacks

idea being that /etc/komodo must be the same path on the host and in the periphery docker volume

@mbecker20 mbecker20 added the setup Help with setting up Komodo label Feb 9, 2025
@mbecker20
Copy link
Member

Yes it sounds like the above is an issue with how Periphery was setup in docker, which many people ran into because the official compose files also suffered from this problem. But now the files are updated with the fix, you can find it here: https://github.com/moghtech/komodo/blob/main/compose/mongo.compose.yaml#L73

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

No branches or pull requests

3 participants