From c808ad1767feaf793a2d14541ac0f4d9cbab45b3 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 5 Nov 2021 20:00:11 +0300 Subject: [PATCH] chore: Move files from build/common --- build/frappe-nginx/Dockerfile | 2 +- .../nginx-default.conf.template | 0 build/frappe-worker/Dockerfile | 12 ++++++------ build/{common/worker => frappe-worker}/bench | 0 .../commands/auto_migrate.py | 0 .../{common => frappe-worker}/commands/background.py | 0 build/{common => frappe-worker}/commands/backup.py | 0 .../commands/check_connection.py | 0 build/{common => frappe-worker}/commands/console.py | 0 .../{common => frappe-worker}/commands/constants.py | 0 build/{common => frappe-worker}/commands/doctor.py | 0 build/{common => frappe-worker}/commands/drop.py | 0 .../commands/gevent_patch.py | 0 build/{common => frappe-worker}/commands/migrate.py | 0 build/{common => frappe-worker}/commands/new.py | 0 .../commands/push_backup.py | 0 .../commands/restore_backup.py | 0 build/{common => frappe-worker}/commands/utils.py | 0 build/{common => frappe-worker}/commands/worker.py | 0 .../common_site_config.json.template | 0 .../worker => frappe-worker}/docker-entrypoint.sh | 0 .../{common/worker => frappe-worker}/healthcheck.sh | 0 .../{common/worker => frappe-worker}/install_app.sh | 0 23 files changed, 7 insertions(+), 7 deletions(-) rename build/{common => frappe-nginx}/nginx-default.conf.template (100%) rename build/{common/worker => frappe-worker}/bench (100%) rename build/{common => frappe-worker}/commands/auto_migrate.py (100%) rename build/{common => frappe-worker}/commands/background.py (100%) rename build/{common => frappe-worker}/commands/backup.py (100%) rename build/{common => frappe-worker}/commands/check_connection.py (100%) rename build/{common => frappe-worker}/commands/console.py (100%) rename build/{common => frappe-worker}/commands/constants.py (100%) rename build/{common => frappe-worker}/commands/doctor.py (100%) rename build/{common => frappe-worker}/commands/drop.py (100%) rename build/{common => frappe-worker}/commands/gevent_patch.py (100%) rename build/{common => frappe-worker}/commands/migrate.py (100%) rename build/{common => frappe-worker}/commands/new.py (100%) rename build/{common => frappe-worker}/commands/push_backup.py (100%) rename build/{common => frappe-worker}/commands/restore_backup.py (100%) rename build/{common => frappe-worker}/commands/utils.py (100%) rename build/{common => frappe-worker}/commands/worker.py (100%) rename build/{common => frappe-worker}/common_site_config.json.template (100%) rename build/{common/worker => frappe-worker}/docker-entrypoint.sh (100%) rename build/{common/worker => frappe-worker}/healthcheck.sh (100%) rename build/{common/worker => frappe-worker}/install_app.sh (100%) diff --git a/build/frappe-nginx/Dockerfile b/build/frappe-nginx/Dockerfile index 241717a3..3b0656ce 100644 --- a/build/frappe-nginx/Dockerfile +++ b/build/frappe-nginx/Dockerfile @@ -48,7 +48,7 @@ RUN mkdir -p /home/frappe/frappe-bench/sites/assets/frappe/ \ FROM nginx:latest COPY --from=0 /home/frappe/frappe-bench/sites /var/www/html/ COPY --from=0 /var/www/error_pages /var/www/ -COPY build/common/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template +COPY build/frappe-nginx/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template COPY build/frappe-nginx/docker-entrypoint.sh / RUN apt-get update && apt-get install -y rsync && apt-get clean \ diff --git a/build/common/nginx-default.conf.template b/build/frappe-nginx/nginx-default.conf.template similarity index 100% rename from build/common/nginx-default.conf.template rename to build/frappe-nginx/nginx-default.conf.template diff --git a/build/frappe-worker/Dockerfile b/build/frappe-worker/Dockerfile index 7a258dfc..f803b085 100644 --- a/build/frappe-worker/Dockerfile +++ b/build/frappe-worker/Dockerfile @@ -60,7 +60,7 @@ RUN apt-get update -y && apt-get install \ && rm -rf /var/lib/apt/lists/* # Setup docker-entrypoint -COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh +COPY build/frappe-worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat USER frappe @@ -84,11 +84,11 @@ RUN python -m venv env \ && pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe # Copy scripts and templates -COPY build/common/commands/* /home/frappe/frappe-bench/commands/ -COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template -COPY build/common/worker/install_app.sh /usr/local/bin/install_app -COPY build/common/worker/bench /usr/local/bin/bench -COPY build/common/worker/healthcheck.sh /usr/local/bin/healthcheck.sh +COPY build/frappe-worker/commands/* /home/frappe/frappe-bench/commands/ +COPY build/frappe-worker/common_site_config.json.template /opt/frappe/common_site_config.json.template +COPY build/frappe-worker/install_app.sh /usr/local/bin/install_app +COPY build/frappe-worker/bench /usr/local/bin/bench +COPY build/frappe-worker/healthcheck.sh /usr/local/bin/healthcheck.sh # Use sites volume as working directory WORKDIR /home/frappe/frappe-bench/sites diff --git a/build/common/worker/bench b/build/frappe-worker/bench similarity index 100% rename from build/common/worker/bench rename to build/frappe-worker/bench diff --git a/build/common/commands/auto_migrate.py b/build/frappe-worker/commands/auto_migrate.py similarity index 100% rename from build/common/commands/auto_migrate.py rename to build/frappe-worker/commands/auto_migrate.py diff --git a/build/common/commands/background.py b/build/frappe-worker/commands/background.py similarity index 100% rename from build/common/commands/background.py rename to build/frappe-worker/commands/background.py diff --git a/build/common/commands/backup.py b/build/frappe-worker/commands/backup.py similarity index 100% rename from build/common/commands/backup.py rename to build/frappe-worker/commands/backup.py diff --git a/build/common/commands/check_connection.py b/build/frappe-worker/commands/check_connection.py similarity index 100% rename from build/common/commands/check_connection.py rename to build/frappe-worker/commands/check_connection.py diff --git a/build/common/commands/console.py b/build/frappe-worker/commands/console.py similarity index 100% rename from build/common/commands/console.py rename to build/frappe-worker/commands/console.py diff --git a/build/common/commands/constants.py b/build/frappe-worker/commands/constants.py similarity index 100% rename from build/common/commands/constants.py rename to build/frappe-worker/commands/constants.py diff --git a/build/common/commands/doctor.py b/build/frappe-worker/commands/doctor.py similarity index 100% rename from build/common/commands/doctor.py rename to build/frappe-worker/commands/doctor.py diff --git a/build/common/commands/drop.py b/build/frappe-worker/commands/drop.py similarity index 100% rename from build/common/commands/drop.py rename to build/frappe-worker/commands/drop.py diff --git a/build/common/commands/gevent_patch.py b/build/frappe-worker/commands/gevent_patch.py similarity index 100% rename from build/common/commands/gevent_patch.py rename to build/frappe-worker/commands/gevent_patch.py diff --git a/build/common/commands/migrate.py b/build/frappe-worker/commands/migrate.py similarity index 100% rename from build/common/commands/migrate.py rename to build/frappe-worker/commands/migrate.py diff --git a/build/common/commands/new.py b/build/frappe-worker/commands/new.py similarity index 100% rename from build/common/commands/new.py rename to build/frappe-worker/commands/new.py diff --git a/build/common/commands/push_backup.py b/build/frappe-worker/commands/push_backup.py similarity index 100% rename from build/common/commands/push_backup.py rename to build/frappe-worker/commands/push_backup.py diff --git a/build/common/commands/restore_backup.py b/build/frappe-worker/commands/restore_backup.py similarity index 100% rename from build/common/commands/restore_backup.py rename to build/frappe-worker/commands/restore_backup.py diff --git a/build/common/commands/utils.py b/build/frappe-worker/commands/utils.py similarity index 100% rename from build/common/commands/utils.py rename to build/frappe-worker/commands/utils.py diff --git a/build/common/commands/worker.py b/build/frappe-worker/commands/worker.py similarity index 100% rename from build/common/commands/worker.py rename to build/frappe-worker/commands/worker.py diff --git a/build/common/common_site_config.json.template b/build/frappe-worker/common_site_config.json.template similarity index 100% rename from build/common/common_site_config.json.template rename to build/frappe-worker/common_site_config.json.template diff --git a/build/common/worker/docker-entrypoint.sh b/build/frappe-worker/docker-entrypoint.sh similarity index 100% rename from build/common/worker/docker-entrypoint.sh rename to build/frappe-worker/docker-entrypoint.sh diff --git a/build/common/worker/healthcheck.sh b/build/frappe-worker/healthcheck.sh similarity index 100% rename from build/common/worker/healthcheck.sh rename to build/frappe-worker/healthcheck.sh diff --git a/build/common/worker/install_app.sh b/build/frappe-worker/install_app.sh similarity index 100% rename from build/common/worker/install_app.sh rename to build/frappe-worker/install_app.sh