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. |
-
For details on building from source, see https://github.com/Apicurio/apicurio-studio.
-
For installation examples, including Docker Compose files, Kubernetes resources, and OpenShift templates, see https://github.com/Apicurio/apicurio-studio/tree/main/examples.
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. |
-
You must have Docker installed and the Docker daemon running.
-
Ensure that you can connect to the quay.io container repository.
-
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
. -
Run the application container image:
$ docker run -it -p 8080:8080 quay.io/apicurio/apicurio-studio:latest-snapshot
-
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.
-
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
-
Verify that the response is similar to the following example:
{"kind":"DesignSearchResults","count":0,"page":1,"pageSize":20,"designs":[]}
-
For more REST API sample requests, see the Apicurio Studio REST API documentation.
-
For demonstration examples, see https://github.com/Apicurio/apicurio-studio/tree/main/examples.
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.
-
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
For more details, see https://www.postgresql.org/docs/12/server-start.html
or
$ docker run -it -p 5432:5432 -e POSTGRES_USER=apicurio-studio -e POSTGRES_PASSWORD=password postgres
-
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
. -
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
-
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.
-
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
-
Verify that the response is similar to the following example:
{"kind":"DesignSearchResults","count":0,"page":1,"pageSize":20,"designs":[]}
-
For more REST API sample requests, see the Apicurio Studio REST API documentation.
-
For demonstration examples, see https://github.com/Apicurio/apicurio-studio/tree/main/examples.
-
For more details on PostgreSQL, see the PostgreSQL documentation.