hippo-docker

Docker image for hosting Hippo CMS

  • Owner: openweb-nl/hippo-docker
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

About this image

This docker image is not meant for direct usage. It is meant to be used as an extension point. For instruction on how to dockerify your Hippo project please the instruction below.

If you are looking for a runnable docker image to test drive Hippo CMS you can use one of the following docker images

How to dockerify a Hippo project

Step 1: Add the following profile to your root pom.xml file.

<profile>
  <id>docker</id>
  <build>
	<plugins>
	  <plugin>
		<groupId>com.spotify</groupId>
		<artifactId>dockerfile-maven-plugin</artifactId>
		<version>1.3.6</version>
		<inherited>false</inherited>
		<configuration>
		  <repository>your-docker-registry/${project.artifactId}</repository>
		  <tag>${project.version}</tag>
		  <pullNewerImage>true</pullNewerImage>
		  <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
		</configuration>
		<executions>
		  <execution>
			<id>docker-build</id>
			<phase>compile</phase>
			<goals>
			  <goal>build</goal>
			</goals>
		  </execution>
		  <execution>
			<id>docker-push</id>
			<phase>package</phase>
			<goals>
			  <goal>push</goal>
			</goals>
		  </execution>
		</executions>
	  </plugin>
	</plugins>
  </build>
  <modules/>
</profile>

Step 2: Add a docker file called Dockerfile in the root of the project with the following content

FROM openweb/hippo:mysql-13

ADD target/artifactId-*-distribution.tar.gz /usr/local/tomcat

Step 3: Make sure that your distribution package does not contain a context.xml or repository.xml file.

Step 4: Add the following fragment to your settings.xml file

<servers>
  ...
  <!-- make sure server.id is exactly the same as <repository/> in the plugin configuration  -->
  <server>
    <id>your-docker-registry</id>
    <username>yourname</username>
    <password>password</password>
  </server>
</servers>

To Build a docker image

mvn clean install
mvn -P dist
mvn -P docker

Run your docker image

Without docker-compose

docker network create --driver bridge hippo-demo-network

docker run --name hippo-demo-mysql \
	--net hippo-demo-network \
	-e MYSQL_ROOT_PASSWORD=rootPassword \
	-e MYSQL_DATABASE=hippo \
	-e MYSQL_USER=hippo \
	-e MYSQL_PASSWORD=hippoPassword \
	-d mysql:5.7

docker run -d -p 8585:8080 --name hippo-demo-node1 \
	--net hippo-demo-network \
	-e DB_HOST=hippo-demo-mysql \
	-e DB_PORT=3306 -e DB_NAME=hippo \
	-e DB_USER=hippo \
	-e DB_PASS=hippoPassword \
	*your-docker-registry/your-artifact-id:your-project-version*

With docker-compose

Create a file called docker-compose.yml with the following content

version: '2'

services:
  hippo:
    image: your-docker-registry/your-artifact-id:your-project-version
    volumes:
      - hippo_repository:/usr/local/repository/
      - hippo_logs:/usr/local/tomcat/logs
    environment:
      DB_HOST: "mysql"
      DB_PORT: "3306"
      DB_NAME: "hippo"
      DB_USER: "hippo"
      DB_PASS: "hippoPassword"
      MAIL_AUTH: "false"
      MAIL_TLS_ENABLE: "false"
      MAIL_HOST: "mailcatcher"
      TZ: "Europe/Amsterdam"
    depends_on:
      - mysql
      - mailcatcher
    ports:
      - "8585:8080"
    restart: always
  mysql:
    image: mysql:5.7
    volumes:
      - mysql_data:/var/lib/mysql
      #- ./dump:/docker-entrypoint-initdb.d
    environment:
      MYSQL_ROOT_PASSWORD: "rootPassword"
      MYSQL_DATABASE: "hippo"
      MYSQL_USER: "hippo"
      MYSQL_PASSWORD: "hippoPassword"
      TZ: "Europe/Amsterdam"
      #command: ["--max_allowed_packet=512M", "--innodb_log_file_size=200M"]
    restart: always
  mailcatcher:
      image: tophfr/mailcatcher:latest
      environment:
        TZ: "Europe/Amsterdam"
      ports:
        - "8586:80"
      restart: always
volumes:
  mysql_data:
    driver: local
  hippo_repository:
    driver: local
  hippo_logs:
    driver: local

Then start the containers with running the following command in the folder that you created the file

docker-compose up -d

Main metrics

Overview
Name With Owneropenweb-nl/hippo-docker
Primary LanguageShell
Program languageShell (Language Count: 2)
Platform
License:
所有者活动
Created At2016-04-01 08:52:05
Pushed At2025-02-28 07:58:29
Last Commit At2025-02-28 08:58:24
Release Count0
用户参与
Stargazers Count7
Watchers Count9
Fork Count7
Commits Count85
Has Issues Enabled
Issues Count1
Issue Open Count0
Pull Requests Count3
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private