diff --git a/Dockerfile b/Dockerfile index ab36e9a..f888e9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ FROM docker WORKDIR / COPY composer /composer -RUN mkdir -p store/stack -RUN touch store/stack/.env RUN apk update RUN apk add --no-cache git python3 py3-pip RUN pip3 install --no-cache-dir --break-system-packages -r composer/requirements.txt diff --git a/composer/agent.py b/composer/agent.py index ae9644e..79c1f40 100644 --- a/composer/agent.py +++ b/composer/agent.py @@ -13,6 +13,11 @@ logger.addHandler(logging.StreamHandler(sys.stdout)) class Setup: + @staticmethod + def populate_store(): + Path("store/stack").mkdir(parents=True, exist_ok=True) + Path("store/stack/.env").touch(exist_ok=True) + @staticmethod def create_symlink(): host_data_env = getenv("HOST_DATA_PATH", None) diff --git a/composer/entrypoint.py b/composer/entrypoint.py index 0bd2674..2c0d93d 100644 --- a/composer/entrypoint.py +++ b/composer/entrypoint.py @@ -3,6 +3,7 @@ import logging from os import getenv import time +Setup.populate_store() Setup.create_symlink() composer = Composer(getenv("REMOTE_REPO")) while True: