From c230983005dadbd8a925297b6c10eb8f53a0eec9 Mon Sep 17 00:00:00 2001 From: minottic Date: Wed, 27 Nov 2024 14:44:34 +0100 Subject: [PATCH] Use root by default in DEV --- entrypoints/chown_root.sh | 5 +++++ .../services/v3/services/archivemock/compose.dev.yaml | 1 - services/compose.dev.yaml | 4 +++- services/landingpage/compose.dev.yaml | 1 - services/searchapi/compose.dev.yaml | 1 - 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100755 entrypoints/chown_root.sh diff --git a/entrypoints/chown_root.sh b/entrypoints/chown_root.sh new file mode 100755 index 00000000..1577e8d4 --- /dev/null +++ b/entrypoints/chown_root.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -e ".finished" ] && return 0 + +chown -R root:root . diff --git a/services/backend/services/v3/services/archivemock/compose.dev.yaml b/services/backend/services/v3/services/archivemock/compose.dev.yaml index ee54d78f..730bfe6e 100644 --- a/services/backend/services/v3/services/archivemock/compose.dev.yaml +++ b/services/backend/services/v3/services/archivemock/compose.dev.yaml @@ -6,7 +6,6 @@ services: labels: !reset null volumes: - archivemock_dev:/job_mock - user: root volumes: archivemock_dev: diff --git a/services/compose.dev.yaml b/services/compose.dev.yaml index b02c1e01..f8d375b0 100644 --- a/services/compose.dev.yaml +++ b/services/compose.dev.yaml @@ -11,9 +11,11 @@ services: # These volumes allow to run init scripts before running the service - ${PWD}/entrypoints/loop_entrypoints.sh:/usr/local/bin/loop_entrypoints.sh - ${PWD}/entrypoints/infinite_loop.sh:/usr/local/bin/infinite_loop.sh - - ${PWD}/entrypoints/setup_git.sh:/docker-entrypoints/00.sh + - ${PWD}/entrypoints/chown_root.sh:/docker-entrypoints/00.sh + - ${PWD}/entrypoints/setup_git.sh:/docker-entrypoints/01.sh environment: GITHUB_REPO: ${GITHUB_REPO:-} + user: root node-app-from-local: extends: web-app volumes: diff --git a/services/landingpage/compose.dev.yaml b/services/landingpage/compose.dev.yaml index 032b7059..85ced13e 100644 --- a/services/landingpage/compose.dev.yaml +++ b/services/landingpage/compose.dev.yaml @@ -11,7 +11,6 @@ services: volumes: - ${PWD}/entrypoints/merge_json.sh:/docker-entrypoints/10.sh - ${PWD}/entrypoints/add_chrome.sh:/docker-entrypoints/20.sh - user: root volumes: landingpage_dev: diff --git a/services/searchapi/compose.dev.yaml b/services/searchapi/compose.dev.yaml index 8af34003..9c3510e7 100644 --- a/services/searchapi/compose.dev.yaml +++ b/services/searchapi/compose.dev.yaml @@ -5,7 +5,6 @@ services: service: node-app-from-local volumes: - ${PWD}/entrypoints/npm_ci.sh:/docker-entrypoints/10.sh - user: root env_file: - ./config/.dev.env