version: "3"
services:
# name of the service
# The CMS service will run Genitcs CMS on localhost:80 to allow editing and managing of our contents
cms:
# base image for the service
image: docker.apa-it.at/gentics/cms:5.45.0
# exposed ports to host
# localhost:80 on the host environment will be bound to localhost:80 from inside of the container
# in this case this is the apache webserver serving the Gentics CMS application
# note that the ports property is an array and can be exended
ports:
- '80:80'
# which files should be added or replaced from the base image
# use this to add your custom implementation and configuration
volumes:
# allow adding multiple cms configuration files
# syntax of these files is php
# https://www.gentics.com/Content.Node/guides/feature_overview.html
- ./cms/cms-config/include.conf:/Node/etc/conf.d/include.conf
- ./cms/cms-config/include:/Node/etc/conf.d/extraconfig
# Gentics CMS DevTool packages see
# https://www.gentics.com/Content.Node/guides/devtools_overview.html
- ./cms/packages:/Node/node/content/packages
# configuration file for Gentics CMS UI
- ./cms/cms-config/ui-overrides.json:/Node/var/httpd/htdocs/.Node/customer-config/config/ui-overrides.json
# setup you service to persit its data in a named docker volume
- cms_dbfiles:/Node/node/content/dbfiles
# Setup environment variables for things not included in your config files
# see https://www.gentics.com/Content.Node/guides/admin_docker.html#environment-variables
environment:
NODE_DB_USER: root
NODE_DB_PASSWORD: ""
NODE_DB_HOST: db
NODE_USER_PASSWORD: node
# Gentics CMS Licensekey
# contact support@genitcs.com to get yours
LICENSEKEY: TH1S-ISNO-TALI-CENS-EKEY
# tell the cms service to wait for the db service before startup
depends_on:
- db
# the `db` service will run an instance of MariaDB to store:
# * CMS data
# * Keycloak
db:
# a list of supported databases can be found here:
# https://www.gentics.com/Content.Node/guides/gcn_compatibility_list.html#databases
# this service uses the official mariadb image from dockerhub
# https://hub.docker.com/_/mariadb
image: mariadb:10.3
command: --sql-mode=""
volumes:
# add an initial database dump to speed up the setup
# this could also be a backup or snapshot of a specific development version
- ./mariadb/.docker/cmssql-initdb:/docker-entrypoint-initdb.d
# add a custom database configuration
# a recommended configuration can be found in our installation guides:
# https://www.gentics.com/Content.Node/guides/admin_install.html#database-server
- ./mariadb/.docker/custom.cnf:/etc/mysql/conf.d/custom.cnf
# persit storage of the database
- cms_db_data:/var/lib/mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_ROOT_PASSWORD: ""
ports:
- "3306:3306"
# Gentics Mesh
# Used for Content Delivery Storage and Search index setup
mesh:
image: docker.apa-it.at/gentics/mesh:1.10.0
volumes:
- mesh_graphdb:/graphdb
- mesh_keystore:/keystore
- mesh_uploads:/uploads
- ./mesh/plugins/keycloak-plugin/storage:/plugins/keycloak/storage
stop_grace_period: 5m
ulimits:
nofile:
soft: 20000
hard: 40000
ports:
- '8200:8080'
environment:
MESH_ELASTICSEARCH_URL: "http://elasticsearch:9200"
MESH_ELASTICSEARCH_START_EMBEDDED: "false"
MESH_UPDATECHECK: "false"
MESH_AUTH_KEYSTORE_PASS: "changeme"
MESH_INITIAL_ADMIN_PASSWORD: "admin"
MESH_INITIAL_ADMIN_PASSWORD_FORCE_RESET: "false"
MESH_GRAPH_TX_COMMIT_TIMEOUT: "30000"
MESH_GRAPH_SYNC_WRITES_TIMEOUT: "60000"
JAVA_TOOL_OPTIONS: "-Xms2g -Xmx2g -XX:MaxDirectMemorySize=212m -Dstorage.diskCache.bufferSize=212 -XX:+HeapDumpOnOutOfMemoryError"
MESH_HTTP_SERVER_TOKENS: "false"
# Gentics Portal | java
portal:
image: repo.example.com/your-portal-image:1.42
ulimits:
nofile:
soft: 20000
hard: 40000
volumes:
# project specific content delivery configuration
- ./portal/data/queries:/portal/data/queries
- ./portal/data/templates:/portal/data/templates
# static frontend assets like stylesheets, javascript and design-images
- ./cms/packages/reference/files:/portal/data/static/reference/files
# setup scripts
- ./portal/.docker/entrypoint.sh:/entrypoint.sh
- ./portal/.docker/waitForMesh.sh:/portal/waitForMesh.sh
- ./portal/.docker/mesh-gen-token.sh:/portal/mesh-gen-token.sh
- ./portal/.docker/initRoles.sh:/portal/initRoles.sh
# https://www.gentics.com/portal-java/docs/development/configuration/#environment-variables
environment:
MESH_HOST: "mesh"
MESH_PORT: 8080
MESH_PROJECT: "reference"
SERVER_URL: "http://localhost:8000"
SERVER_PORT: 8000
ports:
- '8000:8000'
depends_on:
- mesh
keycloak:
image: jboss/keycloak:9.0.3
environment:
DB_VENDOR: mariadb
DB_ADDR: db
DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: keycloak
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
ports:
- '8080:8080'
depends_on:
- db
elasticsearch:
image: docker.apa-it.at/elasticsearch/elasticsearch-oss:6.8.2
volumes:
- esdata:/usr/share/elasticsearch/data
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
stop_grace_period: 5m
ports:
- '9200:9200'
ulimits:
nofile:
soft: 65536
hard: 65536
memlock:
soft: -1
hard: -1
# add additional services as you need them
# myService:
# image: ...
volumes:
cms_db_data:
driver: local
cms_dbfiles:
driver: local
mesh_graphdb:
driver: local
mesh_keystore:
driver: local
mesh_uploads:
driver: local
esdata:
driver: local