Skip to content

Commit

Permalink
Small improvements to systemd templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dwt committed Dec 10, 2024
1 parent 6d1d1de commit cbb42a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions docker/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docker/zope/etc/zope.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit cbb42a8

Please sign in to comment.