hippo-docker

Docker image for hosting Hippo CMS

  • 所有者: openweb-nl/hippo-docker
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者openweb-nl/hippo-docker
主编程语言Shell
编程语言Shell (语言数: 2)
平台
许可证
所有者活动
创建于2016-04-01 08:52:05
推送于2025-02-28 07:58:29
最后一次提交2025-02-28 08:58:24
发布数0
用户参与
星数7
关注者数9
派生数7
提交数85
已启用问题?
问题数1
打开的问题数0
拉请求数3
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?