caprover / one-click-apps

Community Maintained One Click Apps (https://github.com/caprover/caprover)
Apache License 2.0
557 stars 545 forks source link

Add Persistent Directory to Adminer by default #446

Open sandboxplayer opened 3 years ago

sandboxplayer commented 3 years ago

I woud like to create adminer plugins and I can't do that without persistent directories, am I right?

Is here any particular reason why this is not enabled by default in the config file? https://github.com/caprover/one-click-apps/blob/master/public/v4/apps/adminer.yml

githubsaturn commented 3 years ago

One click app templates can easily be modified. You can manually add a dummy volume to the definition.

captainVersion: 4
services:
    $$cap_appname:
        image: adminer:$$cap_adminer_version
        restart: always
        environment:
            ADMINER_PLUGINS: $$cap_adminer_plugins
            ADMINER_DESIGN: $$cap_adminer_design
        volumes:
            - $$cap_appname-data:/data-vol
        caproverExtra:
            containerHttpPort: '8080'
caproverOneClickApp:
    variables:
        - id: $$cap_adminer_version
          label: Adminer Version Tag
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/library/adminer/tags/
          defaultValue: '4'
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_adminer_design
          label: 'OPTIONAL: Adminer Design'
          description: 'List of designs: https://github.com/vrana/adminer/tree/master/designs'
          validRegex: /^([a-zA-Z0-9-.])*$/
        - id: $$cap_adminer_plugins
          label: 'OPTIONAL: Adminer plugins (space separated)'
          defaultValue: ''
          validRegex: /^([a-zA-Z0-9-.\s])*$/
    instructions:
        start: >-
            Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB. 

            For more details, see: https://github.com/vrana/adminer

            Enter your Adminer Configuration parameters and click on next. It will take about a minute for the process to finish.
        end: Adminer is deployed and available as $$cap_appname
    displayName: Adminer
    isOfficial: true
    description: Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP
    documentation: 'Taken from https://hub.docker.com/_/adminer '
sandboxplayer commented 3 years ago

Great, that is exactly what I was looking for.