Commit 46a17688 authored by kaiyou's avatar kaiyou
Browse files

Clone in /tmp/repo for permission reasons

parent cad6d4f2
Pipeline #753 passed with stage
in 56 seconds
......@@ -4,7 +4,8 @@ COPY . /app
WORKDIR /app
RUN pip install -r requirements-prod.txt \
&& useradd amonit
&& useradd amonit \
&& ln -s /config /tmp/repo
USER amonit
......
......@@ -29,8 +29,8 @@ def load():
config_glob = None
if "AMONIT_CONFIG_REPO" in os.environ:
config_repo = os.environ["AMONIT_CONFIG_REPO"]
result = os.system("git clone {} /config".format(config_repo))
config_glob = "/config/*.yaml" if result == 0 else None
result = os.system("git clone {} /tmp/repo".format(config_repo))
config_glob = "/tmp/repo/*.yaml" if result == 0 else None
if "AMONIT_CONFIG" in os.environ:
config_glob = os.environ["AMONIT_CONFIG"]
config_path = glob.glob(config_glob or "amonit.yaml")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment