Installing Apicurio Studio using Docker

This chapter explains how to install and run Apicurio Studio using Docker with the following storage options:

You can install more than one instance of Apicurio Studio depending on your environment. The number of instances depends on your storage option, and on the number and type of designs stored in Apicurio Studio.
Additional resources

Installing Apicurio Studio with in-memory storage

This section explains how to install and run Apicurio Studio with simple in-memory storage from a container image.

The in-memory storage option is suitable for development only. All data is lost when the container image is restarted.
Prerequisites
  • You must have Docker installed and the Docker daemon running.

  • Ensure that you can connect to the quay.io container repository.

Procedure
  1. Get the Apicurio Studio application and web console container images:

    $ docker pull quay.io/apicurio/apicurio-studio:VERSION
    $ docker pull quay.io/apicurio/apicurio-studio-ui:VERSION

    VERSION is the Apicurio Studio release version, for example, latest-snapshot.

  2. Run the application container image:

    $ docker run -it -p 8080:8080 quay.io/apicurio/apicurio-studio:latest-snapshot
  3. Run the web console container image:

    $ docker run -it -p 8888:8080 quay.io/apicurio/apicurio-studio-ui:latest-snapshot

    The Apicurio Studio web console will be available at http://localhost:8888.

  4. Send a test request using the Apicurio Studio REST API. For example, enter the following curl command to get a list of API designs:

    $ curl http://localhost:8080/apis/studio/v1/designs
  5. Verify that the response is similar to the following example:

    {"kind":"DesignSearchResults","count":0,"page":1,"pageSize":20,"designs":[]}
Additional resources

Installing Apicurio Studio with SQL database storage

This section explains how to install and run Apicurio Studio with storage in a PostgreSQL database from a container image. This storage option is suitable for production environments.

Prerequisites
  • You must have Docker installed and the Docker daemon running.

  • Ensure that you can connect to the quay.io container repository.

  • You must already have a PostgreSQL database server installed and running. For example:

    $ postgres -D /usr/local/pgsql/data

    or

    $ docker run -it -p 5432:5432 -e POSTGRES_USER=apicurio-studio -e POSTGRES_PASSWORD=password postgres
Procedure
  1. Get the Apicurio Studio application and web console container images:

    $ docker pull quay.io/apicurio/apicurio-studio:VERSION
    $ docker pull quay.io/apicurio/apicurio-studio-ui:VERSION

    VERSION is the Apicurio Studio release version, for example, latest-snapshot.

  2. Run the application container image:

    $ docker run -it -p 8080:8080 \
      -e APICURIO_STORAGE_DB_KIND=postgresql \
      -e APICURIO_DATASOURCE_URL=jdbc:postgresql://localhost:5432/apicurio-studio \
      -e APICURIO_DATASOURCE_USERNAME=apicurio-studio \
      -e APICURIO_DATASOURCE_PASSWORD=password \
      --network host \
      quay.io/apicurio/apicurio-studio:latest-snapshot
  3. Run the web console container image:

    $ docker run -it -p 8888:8080 quay.io/apicurio/apicurio-studio-ui:latest-snapshot

    The Apicurio Studio web console will be available at http://localhost:8888.

  4. Send a test request using the Apicurio Studio REST API. For example, enter the following curl command to get a list of API designs:

    $ curl http://localhost:8080/apis/studio/v1/designs
  5. Verify that the response is similar to the following example:

    {"kind":"DesignSearchResults","count":0,"page":1,"pageSize":20,"designs":[]}
Additional resources