B
Blueprint2w ago
fxb

[Docker version] Unable to make extensions persistent

Hi! Having an issue with persistency of the docker container. All is working well and I can install blueprint extensions. But as soon as I re-create the containers (clean/wipe and rebuild) all extensions are gone and I have to re-install them. Reproducing the issue: 1. Build container 2. Install extension with blueprint -i xyz 3. Rebuild container and lose all extensions Below is the relevant volume bindings section. I used the classic-docker-compose.yml for my stack.
volumes: - "./var/:/app/var/" - "./nginx/:/etc/nginx/http.d/" - "./logs/:/app/storage/logs" - "./extensions/:/blueprint_extensions"
Notes: -using relative bindings with ./ as I don't have a /srv folder on my nas but rather keep all my docker data in one folder on my synology */volume1/docker/ * (e.g. /volume1/docker/pterodactyl/panel/extensions) -not binding the certs folder as I use my own reverse proxy -removed also the :/app binding as the panel container would be stuck in a boot loop (entrypoint not found), and chatgpt suggested this binding is the culprit and not necessary. after removing that binding all worked fine, but I'm aware that might also be the reason why the extensions disappear after a rebuild^^
Solution:
You're missing a volume. Add
- "app:/app"
- "app:/app"
...
Jump to solution
5 Replies
fxb
fxbOP2w ago
This is the folder structure. I kept the /app folder since the unsuccesful attempt but unbinded it.
No description
Loki
Loki2w ago
What does your compose file look like? -# Remember to redact passwords
fxb
fxbOP2w ago
services:
database:
image: mariadb:10.5
container_name: pterodactyl-panel-db
restart: always
command: --default-authentication-plugin=mysql_native_password
volumes:
- "./db:/var/lib/mysql"
environment:
<<: *db-environment
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"

cache:
image: redis:alpine
container_name: pterodactyl-panel-cache
restart: always

panel:
image: ghcr.io/blueprintframework/blueprint:v1.11.11
container_name: pterodactyl-panel-app
restart: always
ports:
- "6085:80"
- "6086:443"
links:
- database
- cache
volumes:
- "./var/:/app/var/"
- "./nginx/:/etc/nginx/http.d/"
- "./logs/:/app/storage/logs"
- "./extensions/:/blueprint_extensions"
environment:
<<: [*panel-environment, *mail-environment]
DB_PASSWORD: *db-password
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: "false"
CACHE_DRIVER: "redis"
SESSION_DRIVER: "redis"
QUEUE_DRIVER: "redis"
REDIS_HOST: "cache"
DB_HOST: "database"
DB_PORT: "3306"
services:
database:
image: mariadb:10.5
container_name: pterodactyl-panel-db
restart: always
command: --default-authentication-plugin=mysql_native_password
volumes:
- "./db:/var/lib/mysql"
environment:
<<: *db-environment
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"

cache:
image: redis:alpine
container_name: pterodactyl-panel-cache
restart: always

panel:
image: ghcr.io/blueprintframework/blueprint:v1.11.11
container_name: pterodactyl-panel-app
restart: always
ports:
- "6085:80"
- "6086:443"
links:
- database
- cache
volumes:
- "./var/:/app/var/"
- "./nginx/:/etc/nginx/http.d/"
- "./logs/:/app/storage/logs"
- "./extensions/:/blueprint_extensions"
environment:
<<: [*panel-environment, *mail-environment]
DB_PASSWORD: *db-password
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: "false"
CACHE_DRIVER: "redis"
SESSION_DRIVER: "redis"
QUEUE_DRIVER: "redis"
REDIS_HOST: "cache"
DB_HOST: "database"
DB_PORT: "3306"
Solution
Loki
Loki2w ago
You're missing a volume. Add
- "app:/app"
- "app:/app"
under panel volumes, and add
volumes:
app:
volumes:
app:
at the bottom of your compose file (no indentation).
fxb
fxbOP2w ago
That solved it, thanks a lot 🙏 Also was sent down a rabbit hole learning a lot about named volumes vs. relative/absolute volume bindings. For anyone interested and running into the same issue: If you mount an empty volume to /app inside the container via relative or absolte paths, it will essentially wipe the containers counterpart, i.e. the whole /app folder, when starting the container. So you have to use named volumes instead (at least for /app, I kept the relative bindings for the other folders) as these are managed by Docker. And even if they're empty at the beginning, they're going to be prepopulated when the container starts.

Did you find this page helpful?