bootstrapping worked

This commit is contained in:
Christian Winther 2024-01-05 16:52:00 +00:00
parent 052c11882c
commit c1fbccb07c
4 changed files with 22 additions and 8 deletions

View file

@ -1,6 +1,9 @@
data
docker-compose*.yml
.dockerignore .dockerignore
.env
.git .git
.gitignore .gitignore
.env contrib/docker-compose/.env
contrib/docker-compose/config
contrib/docker-compose/data
data
docker-compose*.yml

View file

@ -41,7 +41,7 @@ APP_NAME="Pixelfed Prod"
# Application domains used for routing. # Application domains used for routing.
# #
# See: https://docs.pixelfed.org/technical-documentation/config/#app_domain # 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. # 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. # You should set this to the root of your application so that it is used when running Artisan tasks.

View file

@ -4,12 +4,16 @@ version: "3"
services: services:
web: web:
image: "${DOCKER_IMAGE}:${DOCKER_TAG}" image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
build:
context: ../..
dockerfile: contrib/docker/Dockerfile
target: apache-runtime
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- "./.env" - "./.env"
volumes: volumes:
- "./.env:/var/www/.env" - "./.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" - "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
ports: ports:
- "${DOCKER_WEB_PORT_EXTERNAL}:80" - "${DOCKER_WEB_PORT_EXTERNAL}:80"
@ -19,13 +23,17 @@ services:
worker: worker:
image: "${DOCKER_IMAGE}:${DOCKER_TAG}" image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
build:
context: ../..
dockerfile: contrib/docker/Dockerfile
target: apache-runtime
command: gosu www-data php artisan horizon command: gosu www-data php artisan horizon
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- "./.env" - "./.env"
volumes: volumes:
- "./.env:/var/www/.env" - "./.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" - "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
depends_on: depends_on:
- db - db

View file

@ -3,8 +3,11 @@ source /docker/helpers.sh
entrypoint-set-script-name "$0" 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 # 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 # Ensure storage linkk are correctly configured
php artisan storage:link run-as-runtime-user php artisan storage:link