Docker image for Plone with EEA Common Add-ons available (formerly known as EEA Common Plone Buildout (KGS)
This image is generic, thus you can obviously re-use it within your non-related EEA projects.
- Install Docker
- Install Docker Compose (optional)
- Python 2.7.12
- Plone 4.3.10
- Zope 2.13.24
$ docker run -p 8080:8080 eeacms/kgs
Now, ask for http://localhost:8080/ in your workstation web browser and add a Plone site (default credentials admin:admin).
See more at plone
Start ZEO server:
$ docker run -d --name=zeo \
-e ZOPE_MODE=zeoserver \
eeacms/kgs
Start 2 Plone clients:
$ docker run -d --name=zclient1 \
-e ZOPE_MODE=zeo_client \
--link=zeo:zeoserver \
eeacms/kgs
$ docker run -d --name=zclient2 \
-e ZOPE_MODE=zeo_client \
--link=zeo:zeoserver \
eeacms/kgs
Start load balancer:
$ docker run -d --name=lb \
-p 8080:5000 \
-p 1936:1936 \
--link=zclient1 \
--link=zclient2 \
-e BACKENDS="zclient1 zclient2" \
-e BACKENDS_PORT=8080 \
-e DNS_ENABLED=true \
eeacms/haproxy
Check load-balancer back-ends health at http://localhost:1936/ (default credentials admin:admin).
If everything looks OK go to http://localhost:8080/ and add your Plone site.
See detailed ZEO client examples.
Also you can run this image as:
For this you'll have to provide the following custom files:
buildout.cfgDockerfile
Below is an example of buildout.cfg and Dockerfile to build a custom version
of Plone with your custom versions of packages based on EEA KGS image:
buildout.cfg:
[buildout]
extends = eea.cfg
auto-checkout =
land.copernicus.theme
land.copernicus.content
[configuration]
eggs +=
land.copernicus.theme
land.copernicus.content
[sources]
land.copernicus.theme = git https://github.com/eea/land.copernicus.theme.git
land.copernicus.content = git https://github.com/eea/land.copernicus.content.git
Dockerfile:
FROM eeacms/kgs:8.4
COPY buildout.cfg /plone/instance/
RUN buildout
and then run
$ docker build -t plone-land-copernicus .
$ docker pull eeacms/kgs
ZOPE:
ZOPE_MODECan bezeoserver,standalone,zeo_client,zeo_async,rel_client,rel_async. DefaultstandaloneZOPE_THREADSConfigure zserver-threads. Default2(e.g.:ZOPE_THREADS=4)ZOPE_FAST_LISTENSet tooffto defer opening of the HTTP socket until the end of the Zope startup phase. Defaults tooff(e.g.:ZOPE_FAST_LISTEN=on)ZOPE_FORCE_CONNECTION_CLOSESet toonto enforce Zope to setConnection: close header. Defaulton(e.g.:ZOPE_FORCE_CONNECTION_CLOSE=off)
RELSTORAGE:
RELSTORAGE_HOSTCustom PostgreSQL address,postgresby default (e.g.:RELSTORAGE_HOST=1.2.3.4)RELSTORAGE_USERCustom PostgreSQL user,zopeby default (e.g.:RELSTORAGE_USER=plone)RELSTORAGE_PASSCustom PostgreSQL password,zopeby default (e.g.:RELSTORAGE_PASS=secret)RELSTORAGE_KEEP_HISTORYhistory-preserving database schema,trueby default (e.g.:RELSTORAGE_KEEP_HISTORY=false)
GRAYLOG:
GRAYLOGConfigure zope inside container to send logs to GrayLog. Defaultlogcentral.eea.europa.eu:12201. (e.g.:GRAYLOG=logs.example.com:12201)GRAYLOG_FACILITYCustom GrayLog facility. Defaulteea.docker.kgs(e.g.:GRAYLOG_FACILITY=staging.example.com)
SENTRY:
SENTRY_DSNSend python tracebacks to sentry.eea.europa.eu (e.g.:SENTRY_DSN=https://<public_key>:<secret_key>@sentry.eea.europa.eu)SENTRY_SITE,SERVER_NAMEUsually the application URL without scheme (e.g.:SERVER_NAME=staging.eea.europa.eu)SENTRY_RELEASEYour custom KGS application version (e.g:SENTRY_RELEASE=18.5.9-2.26)SENTRY_ENVIRONMENT,ENVIRONMENTOverride environment. Leave empty to automatically get it fromrancher-metadata
CORS:
CORS_ALLOW_ORIGIN- Origins that are allowed access to the resource. Either a comma separated list of origins, for examplehttp://example.net,http://mydomain.comor*. Defaults tohttp://localhost:3000,http://127.0.0.1:3000CORS_ALLOW_METHODS- A comma separated list of HTTP method names that are allowed by this CORS policy, for exampleDELETE,GET,OPTIONS,PATCH,POST,PUT. Defaults toDELETE,GET,OPTIONS,PATCH,POST,PUTCORS_ALLOW_CREDENTIALS- Indicates whether the resource supports user credentials in the request. Defaults totrueCORS_EXPOSE_HEADERS- A comma separated list of response headers clients can access, for exampleContent-Length. Defaults toContent-Length,X-My-HeaderCORS_ALLOW_HEADERS- A comma separated list of request headers allowed to be sent by the client, for exampleX-My-Header. Defaults toAccept,Authorization,Content-TypeCORS_MAX_AGE- Indicates how long the results of a preflight request can be cached. Defaults to3600
Get source code
$ git clone git@github.com:eea/eea.docker.kgs.git
Update EEA_KGS_VERSION env within Dockerfile
$ cd eea.docker.kgs
$ vim Dockerfile
Commit changes
$ git commit -am "Release 19.5"
Create tag
$ git tag 19.5
Push changes
$ git push --tags
$ git push
Update release notes
$ docker run -it --rm -e GIT_NAME="eea.docker.kgs" eeacms/gitflow bash
$ /unifyChangelogs.py 19.4 19.5 2> /dev/null
Add output to https://github.com/eea/eea.docker.kgs/releases/new
The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
The Original Code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.