diff --git a/Dockerfile b/Dockerfile index 00f2006..3ce651c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,7 @@ FROM runtime-base AS production ENV RAILS_ENV=production COPY --from=bundle-production /usr/local/bundle /usr/local/bundle +COPY Gemfile Gemfile.lock /app/ COPY app /app/app COPY bin /app/bin COPY config /app/config @@ -83,6 +84,7 @@ RUN apt-get update -qq \ && python3 -m pip install --no-cache-dir invoke COPY --from=bundle-test /usr/local/bundle /usr/local/bundle +COPY Gemfile Gemfile.lock /app/ COPY app /app/app COPY bin /app/bin COPY config /app/config diff --git a/tasks.py b/tasks.py index af6fa28..96f2020 100644 --- a/tasks.py +++ b/tasks.py @@ -49,9 +49,10 @@ BLACKBOX_MAILGUN_API_KEY = "blackbox-test-api-key" BLACKBOX_MAILGUN_DOMAIN = "blackbox.example.com" SPEC_ROOT = Path("spec") E2E_SPEC_ROOT = SPEC_ROOT / "e2e" / "http" -BUNDLER_VERSION = Path("Gemfile.lock").read_text(encoding="utf-8").split("BUNDLED WITH", 1)[1].strip().splitlines()[-1].strip() ROOT = Path(__file__).resolve().parent DB_DIR = ROOT / "db" +GEMFILE_LOCK_PATH = ROOT / "Gemfile.lock" +BUNDLER_VERSION = GEMFILE_LOCK_PATH.read_text(encoding="utf-8").split("BUNDLED WITH", 1)[1].strip().splitlines()[-1].strip() def _env(**overrides):