diff --git a/docker/systemd/zeo.service b/docker/systemd/zeo@.service similarity index 75% rename from docker/systemd/zeo.service rename to docker/systemd/zeo@.service index 3fd5cac3d..aef56827a 100644 --- a/docker/systemd/zeo.service +++ b/docker/systemd/zeo@.service @@ -9,6 +9,7 @@ User=zope Group=zope Restart=always +Environment="ZEO_PUBLIC_PORT=%i" Environment="INSTANCE_HOME=/path/to/instance_home" Environment="DOCKER_IMAGE=localhost/zms DOCKER_TAG=latest" @@ -18,7 +19,7 @@ PrivateTmp=true ExecStartPre=-/usr/bin/podman stop $DOCKER_IMAGE # TODO add zeo run command # TODO find a way to parametrize the zeo port or use a file based socket -ExecStart=/usr/bin/podman run --rm --name $DOCKER_IMAGE $DOCKER_IMAGE:$DOCKER_TAG +ExecStart=/usr/bin/podman run --rm --publish 127.0.0.1:$ZEO_PUBLIC_PORT:80 --name $DOCKER_IMAGE $DOCKER_IMAGE:$DOCKER_TAG [Install] WantedBy=multi-user.target diff --git a/docker/systemd/zms@.service b/docker/systemd/zms@.service index 194b2422b..65984c44d 100644 --- a/docker/systemd/zms@.service +++ b/docker/systemd/zms@.service @@ -14,6 +14,7 @@ Group=zope Restart=always Environment="ZOPE_PUBLIC_PORT=%i" +Environment="INSTANCE_HOME=/path/to/instance_home" Environment="DOCKER_IMAGE=localhost/zms DOCKER_TAG=latest" TimeoutStartSec=0 diff --git a/docker/zope/etc/zope.ini b/docker/zope/etc/zope.ini index 1c4048e81..f7c5e4d0b 100755 --- a/docker/zope/etc/zope.ini +++ b/docker/zope/etc/zope.ini @@ -4,8 +4,13 @@ zope_conf = %(here)s/zope.conf [server:main] use = egg:waitress#main +# If deployed on bare metal # host 127.0.0.1 +# If deployed in a container host = 0.0.0.0 +# If deployed on bare metal, need to configure the port +# port = %(http_port)s +# If deployed in a container port = 80 [filter:translogger]