All Adaptable TeaStore services in a single image
571
The Adaptable TeaStore All image enables you to run the complete Adaptable TeaStore application in a single container, requiring only an external database. This setup is ideal for quick installations and evaluations. For more advanced usage or research scenarios, it is recommended to deploy each service in its own container.
This image encapsulates all components of the Adaptable TeaStore, including the web UI, recommender, persistence, and other services. Each service can communicate using REST and is designed for easy scaling and management.
To set up the database, you can either install it manually or run the recommended TeaStore database container:
docker run -p 3306:3306 -d cerberus237/adaptable-teastore-db
After the database is running, you can start the Adaptable TeaStore container and specify the database address with the following command:
docker run -e "DB_HOST=10.1.1.1" -p 8080:8080 -d cerberus237/adaptable-teastore-all
The DB_HOST environment variable must not be set to "localhost" or "127.0.0.1". Instead, use the host machine's hostname or an externally accessible IP when running the database on the same machine as the Adaptable TeaStore container.
You can access the Adaptable TeaStore's UI on the published port. For example, if running on a host with the IP 10.1.1.2, you can access it using:
http://10.1.1.2:8080/tools.descartes.teastore.webui/
Here’s a sample docker-compose.yml file to demonstrate how to set up the Adaptable TeaStore with a database:
version: '3'
services:
db:
image: cerberus237/adaptable-teastore-db
expose:
- "3306"
ports:
- "3306:3306"
adaptable-teastore:
depends_on:
- db
image: cerberus237/adaptable-teastore-all
expose:
- "8080"
ports:
- "8080:8080"
environment:
DB_HOST: "db"
The Dockerfile for the Adaptable TeaStore All image is structured as follows:
FROM cerberus237/adaptable-teastore-base:latest
LABEL org.opencontainers.image.authors="Inria R&D engineer <[email protected]>"
COPY target/*.war /usr/local/tomcat/webapps/
The pom.xml file is used to generate all the WAR files for each service in the Adaptable TeaStore. Below is its structure:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>docker.all</artifactId>
<name>TeaStore Docker All Services Image</name>
<url>http://descartes.tools</url>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>tools.descartes.teastore</groupId>
<artifactId>registry</artifactId>
<version>${teastoreversion}</version>
<type>war</type>
</dependency>
<!-- Additional dependencies for other services -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>tools.descartes.teastore</groupId>
<artifactId>registry</artifactId>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/</outputDirectory>
<destFileName>tools.descartes.teastore.registry.war</destFileName>
</artifactItem>
<!-- Additional artifact items for other services -->
</artifactItems>
<outputDirectory>${project.build.directory}/</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>tools.descartes.teastore.dockerbase</finalName>
</build>
<parent>
<groupId>tools.descartes.teastore</groupId>
<artifactId>parent</artifactId>
<version>${teastoreversion}</version>
<relativePath>../..</relativePath>
</parent>
</project>
The Adaptable TeaStore All image provides a streamlined way to run the entire Adaptable TeaStore application in a single container, making it easy to set up and test. The provided Dockerfile and pom.xml facilitate the integration of various services, ensuring a comprehensive and efficient deployment. For further details, refer to the Getting Started documentation.
Content type
Image
Digest
sha256:5b1ce5985…
Size
423.1 MB
Last updated
about 1 year ago
docker pull cerberus237/adaptable-teastore-all