Fix docker issues (#2375)

This commit is contained in:
Michael (Parker) Parker
2026-06-11 10:00:01 -04:00
committed by GitHub
parent cc2aa38ad4
commit 69e88a2ea7
6 changed files with 70 additions and 10 deletions

View File

@@ -74,16 +74,14 @@ COPY --chown=root:www-data --chmod=770 --from=composerbuild /build .
COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public
# Create and remove directories
RUN mkdir -p /pelican-data/storage /pelican-data/plugins /var/run/supervisord \
&& rm -rf /var/www/html/plugins \
# Symlinks for env, database, storage, and plugins
RUN mkdir -p /pelican-data/storage /var/run/supervisord \
# Symlinks for env, database, storage
&& ln -s /pelican-data/.env /var/www/html/.env \
&& ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \
&& ln -s /pelican-data/storage /var/www/html/public/storage \
&& ln -s /pelican-data/storage /var/www/html/storage/app/public \
&& ln -s /pelican-data/plugins /var/www/html \
# Allow www-data write permissions where necessary
&& chown -R www-data: /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \
&& chown -R www-data: /pelican-data .env ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \
&& chmod -R 770 /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \
&& chown -R www-data: /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ /var/www/html/composer.json /var/www/html/composer.lock
# Configure Supervisor

View File

@@ -79,16 +79,14 @@ COPY --chown=root:www-data --chmod=770 --from=composerbuild /build .
COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public
# Create and remove directories
RUN mkdir -p /pelican-data/storage /pelican-data/plugins /var/run/supervisord \
&& rm -rf /var/www/html/plugins \
# Symlinks for env, database, storage, and plugins
RUN mkdir -p /pelican-data/storage /var/run/supervisord \
# Symlinks for env, database, storage
&& ln -s /pelican-data/.env /var/www/html/.env \
&& ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \
&& ln -s /pelican-data/storage /var/www/html/public/storage \
&& ln -s /pelican-data/storage /var/www/html/storage/app/public \
&& ln -s /pelican-data/plugins /var/www/html \
# Allow www-data write permissions where necessary
&& chown -R www-data: /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \
&& chown -R www-data: /pelican-data .env ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \
&& chmod -R 770 /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \
&& chown -R www-data: /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ /var/www/html/composer.json /var/www/html/composer.lock

52
compose-bind.yml Normal file
View File

@@ -0,0 +1,52 @@
x-common:
panel:
&panel-environment
APP_URL: "http://localhost"
LE_EMAIL: "USEYOUROWNEMAILHERE@example.com" # email to be used for let's encrypt certificates
APP_DEBUG: "false"
APP_ENV: "production"
# BEHIND_PROXY: true # uncomment to run behind a proxy
# TRUSTED_PROXIES: 127.0.0.1,172.17.0.1,172.20.0.1 # defaults are for local proxies
mail:
&mail-environment
MAIL_DRIVER: "log"
# MAIL_HOST: ""
# MAIL_PORT: ""
# MAIL_FROM: ""
# MAIL_USERNAME: ""
# MAIL_PASSWORD: ""
# MAIL_SCHEME: ""
#
# ------------------------------------------------------------------------------------------
# DANGER ZONE BELOW
#
# The remainder of this file likely does not need to be changed. Please only make modifications
# below if you understand what you are doing.
#
services:
panel:
user: "0:0"
image: ghcr.io/pelican-dev/panel:latest
build: .
restart: unless-stopped
networks:
- default
ports:
- "80:80"
- "443:443"
# - "81:80" # if you are behind a proxy uncomment this line and comment out 80 and 443
# - "9000:9000" # enable when not using caddy to be able to reach php-fpm
extra_hosts:
- "host.docker.internal:host-gateway" # shows the panel on the internal docker network as well. usually '172.17.0.1'
volumes:
- /opt/pelican/data:/pelican-data
- /opt/pelican/logs:/var/www/html/storage/logs
- /opt/pelican/plugins:/var/www/html/plugins
environment:
<<: [*panel-environment, *mail-environment]
XDG_DATA_HOME: /pelican-data
# SKIP_CADDY: true # enable when not using caddy.

View File

@@ -69,6 +69,11 @@ services:
volumes:
- pelican-data:/pelican-data
- pelican-logs:/var/www/html/storage/logs
- type: volume
source: pelican-data
target: /var/www/html/plugins
volume:
subpath: plugins
environment:
<<: [*panel-environment, *mail-environment]
XDG_DATA_HOME: /pelican-data

View File

@@ -44,6 +44,12 @@ services:
volumes:
- pelican-data:/pelican-data
- pelican-logs:/var/www/html/storage/logs
- type: volume
source: pelican-data
target: /var/www/html/plugins
volume:
subpath: plugins
environment:
<<: [*panel-environment, *mail-environment]
XDG_DATA_HOME: /pelican-data

View File

@@ -1 +1,2 @@
* * * * * php /var/www/html/artisan schedule:run
0 0 * * * php /var/www/html/artisan p:egg:check-updates