Skip to content

RFC: Improve compatibility with Docker Compose #786

@githubsaturn

Description

@githubsaturn

Currently CapRover one click apps are built using docker compose files, but with many variations.

In the new design, we can make the following two changes:

  • New one click app format will accept YAML as well as JSON because, by default, docker compose files are in YAML and not json.
  • The new format of one-click app is an extension of docker compose, not extraction. That means, to create a one click app, you simply start by a docker compose file, and add caprover specific things to it. Here is what it'll look like:
version: "3.3"
services:
  $$cap_appname:
    image: 'adminer:$$cap_adminer_version'
    restart: always
    environment:
      ADMINER_PLUGINS: $$cap_adminer_plugins
      ADMINER_DESIGN: $$cap_adminer_design
    caproverExtra:
      containerHttpPort: '8080'
### ================================
### CAPROVER ONE CLICK APP SPECIFICS
### ================================
captainVersion: 4
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........
    end: Adminer is deployed and available as $$cap_appname
  displayName: Adminer
  description: >-
    Adminer .....
  documentation: 'Taken from https://hub.docker.com/_/adminer '

CapRover specific service settings are consolidated under caproverExtra and CapRover one click app configs are consolidated under caproverOneClickApp. The new captainVersion is set to 4 to match the API version we use for one click app as well as the schema version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions