From c1fbccb07c6419dd809c9a273af33868b6c43a73 Mon Sep 17 00:00:00 2001 From: Christian Winther Date: Fri, 5 Jan 2024 16:52:00 +0000 Subject: [PATCH] bootstrapping worked --- .dockerignore | 9 ++++++--- contrib/docker-compose/.env | 2 +- contrib/docker-compose/docker-compose.yml | 12 ++++++++++-- .../shared/root/docker/entrypoint.d/10-storage.sh | 7 +++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index bc5af5a21..a4f4ff035 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,9 @@ -data -docker-compose*.yml .dockerignore +.env .git .gitignore -.env +contrib/docker-compose/.env +contrib/docker-compose/config +contrib/docker-compose/data +data +docker-compose*.yml diff --git a/contrib/docker-compose/.env b/contrib/docker-compose/.env index 076edf09b..9ad25eeff 100644 --- a/contrib/docker-compose/.env +++ b/contrib/docker-compose/.env @@ -41,7 +41,7 @@ APP_NAME="Pixelfed Prod" # Application domains used for routing. # # See: https://docs.pixelfed.org/technical-documentation/config/#app_domain -APP_DOMAIN="your-domain-here-dot-com" +APP_DOMAIN="pixelfed-test.jippi.dev" # This URL is used by the console to properly generate URLs when using the Artisan command line tool. # You should set this to the root of your application so that it is used when running Artisan tasks. diff --git a/contrib/docker-compose/docker-compose.yml b/contrib/docker-compose/docker-compose.yml index ff7734797..8df0777b3 100644 --- a/contrib/docker-compose/docker-compose.yml +++ b/contrib/docker-compose/docker-compose.yml @@ -4,12 +4,16 @@ version: "3" services: web: image: "${DOCKER_IMAGE}:${DOCKER_TAG}" + build: + context: ../.. + dockerfile: contrib/docker/Dockerfile + target: apache-runtime restart: unless-stopped env_file: - "./.env" volumes: - "./.env:/var/www/.env" - - "${DOCKER_DATA_ROOT}/pixelfed/bootstrap:/var/www/bootstrap" + - "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache" - "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage" ports: - "${DOCKER_WEB_PORT_EXTERNAL}:80" @@ -19,13 +23,17 @@ services: worker: image: "${DOCKER_IMAGE}:${DOCKER_TAG}" + build: + context: ../.. + dockerfile: contrib/docker/Dockerfile + target: apache-runtime command: gosu www-data php artisan horizon restart: unless-stopped env_file: - "./.env" volumes: - "./.env:/var/www/.env" - - "${DOCKER_DATA_ROOT}/pixelfed/bootstrap:/var/www/bootstrap" + - "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache" - "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage" depends_on: - db diff --git a/contrib/docker/shared/root/docker/entrypoint.d/10-storage.sh b/contrib/docker/shared/root/docker/entrypoint.d/10-storage.sh index 6677c313f..f0e467973 100755 --- a/contrib/docker/shared/root/docker/entrypoint.d/10-storage.sh +++ b/contrib/docker/shared/root/docker/entrypoint.d/10-storage.sh @@ -3,8 +3,11 @@ source /docker/helpers.sh entrypoint-set-script-name "$0" +run-as-current-user chown --verbose ${RUNTIME_UID}:${RUNTIME_GID} "./bootstrap/cache" +run-as-current-user chown --verbose ${RUNTIME_UID}:${RUNTIME_GID} "./storage" + # Copy the [storage/] skeleton files over the "real" [storage/] directory so assets are updated between versions -cp --recursive storage.skel/. storage/ +run-as-runtime-user cp --recursive storage.skel/. ./storage/ # Ensure storage linkk are correctly configured -php artisan storage:link +run-as-runtime-user php artisan storage:link