caprover / one-click-apps

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

App Suggestion: [Admidio] #952

Open steigerdich opened 1 year ago

steigerdich commented 1 year ago

Please tell us what app you'd like to see on CapRover as a one-click app. Admidio is a free online membership management, which is optimized for associations, groups and organizations.

Do you know if there is any official Docker image for the app? There is: https://hub.docker.com/r/admidio/admidio

I already tried it like this but Admidio seems to need volumes Admidio_files, Admidio_plugins and Admidio_themes with underscores. In fact, that underscores are not allowed in Caprover i tried it with service override, but it doesn't have any effect. Maybe someone can help...

captainVersion: 4
services:
    $$cap_appname-db:
        image: mariadb:$$cap_database_version
        volumes:
            - $$cap_appname-db-config:/etc/mysql/conf.d
            - $$cap_appname-db-data:/var/lib/mysql
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: $$cap_db_pass
            MYSQL_DATABASE: $$cap_admidio_db_name
            MYSQL_USER: $$cap_admidio_db_user
            MYSQL_PASSWORD: $$cap_admidio_db_pass
        caproverExtra:
            notExposeAsWebApp: 'true'
    $$cap_appname:
        depends_on:
            - $$cap_appname-db
        image: admidio/admidio:$$cap_admidio_version
        #volumes:
            #- $$cap_appname-files:/opt/app-root/src/adm_my_files
            #- $$cap_appname-themes:/opt/app-root/src/adm_themes
            #- $$cap_appname-plugins:/opt/app-root/src/adm_plugins
        ports:
            - 8084:8080
        restart: always
        environment:
            ADMIDIO_DB_TYPE: mysql
            ADMIDIO_DB_USER: $$cap_admidio_db_user
            ADMIDIO_DB_HOST: srv-captain--$$cap_appname-db:3306
            ADMIDIO_DB_NAME: $$cap_admidio_db_name
            ADMIDIO_DB_PASSWORD: $$cap_admidio_db_pass
            ADMIDIO_DB_TABLE_PRAEFIX: $$cap_db_prefix
TaskTemplate:
  ContainerSpec:
    Mounts:
      - Type: volume
        Source: Admidio_files
        Target: /opt/app-root/src/adm_my_files
        ReadOnly: false
      - Type: volume
        Source: Admidio_themes
        Target: /opt/app-root/src/adm_themes
        ReadOnly: false
      - Type: volume
        Source: Admidio_plugins
        Target: /opt/app-root/src/adm_plugins
        ReadOnly: false
caproverOneClickApp:
    variables:
        - id: $$cap_admidio_db_name
          label: Database name
          defaultValue: admidio
        - id: $$cap_admidio_db_user
          label: Database user
          defaultValue: admidio
          validRegex: /^([a-zA-Z0-9])+$/
        - id: $$cap_admidio_db_pass
          label: Database password
          defaultValue: $$cap_gen_random_hex(16)
          description: ''
          validRegex: /^(\w|[^\s"'\\])+$/
        - id: $$cap_database_version
          label: Database Version
          defaultValue: '10.6.14'
          description: Check out the Docker pages for the valid tags https://hub.docker.com/_/mariadb/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_db_prefix
          label: Database prefix
          defaultValue: adm
        - id: $$cap_db_pass
          label: MySQL-Root-Password
          defaultValue: $$cap_gen_random_hex(16)
        - id: $$cap_admidio_version
          label: Admidio Version
          defaultValue: 'v4.2.8'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/admidio/admidio/tags
          validRegex: /^([^\s^\/])+$/
    instructions:
        start: >-
            Admidio is a free online membership management, which is optimized for associations, groups and organizations.
        end: >
            Admidio is ready for final steps at http://$$cap_appname.$$cap_root_domain .

            Have fun!
    displayName: Admidio
    isOfficial: true
    description: Admidio is a free online membership management, which is optimized for associations, groups and organizations.
    documentation: Taken from https://hub.docker.com/r/admidio/admidio.
githubsaturn commented 1 year ago

You don't need the TaskTemplate section, just uncomment this section:

            #- $$cap_appname-files:/opt/app-root/src/adm_my_files
            #- $$cap_appname-themes:/opt/app-root/src/adm_themes
            #- $$cap_appname-plugins:/opt/app-root/src/adm_plugins
steigerdich commented 1 year ago

The problem is, that Admidio needs the volumes Admidio_files, Admidio_plugins and Admidio_themes with underscores.. How can i solve that? When I uncomment the section above, (in best case) the volumes are admidio-files, admidio-plugins and admidio-themes. I just tried that and Admidio doesn't work...

githubsaturn commented 1 year ago

I just tried that and Admidio doesn't work...

That has nothing to do with underscore. Admidio doesn't have access to the volume names. Docker volume names can be named whatever.

I suggest you follow up with the Admidio's support channels.