Skip to content

Commit

Permalink
Run Pecbridge as an additional webapp process
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidePrincipi committed Jul 30, 2024
1 parent 4745f9a commit 0e07817
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions imageroot/systemd/user/pecbridge.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This systemd unit starts a webtop instance using Podman.
# Most parts of this file come from podman-generate-systemd.
#
[Unit]
Description=WebTop webapp
Requires=webapp.service
After=webapp.service
PartOf=webtop.service

[Service]
Type=simple
Environment=PODMAN_SYSTEMD_UNIT=%n
WorkingDirectory=%S/state
Restart=always
ExecStart=/usr/bin/podman exec webapp /usr/share/pecbridge/bin/run.sh
1 change: 1 addition & 0 deletions imageroot/systemd/user/webtop.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ExecStartPre=/usr/bin/podman pod create \
--publish=${TCP_PORT}:8081 \
--network=slirp4netns:allow_host_loopback=true \
--add-host=accountprovider:10.0.2.2 \
--add-host=mailnode:${Z_PUSH_IMAP_SERVER} \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/webtop.pod-id
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/webtop.pod-id -t 10
Expand Down
3 changes: 2 additions & 1 deletion webapp/usr/share/pecbridge/etc/config.xml.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<sonicle-pec-bridge port="10125">
<default host="localhost" port="25" debug="false" />
<!-- "mailnode" is resolved to the Mail module VPN IP address -->
<default host="mailnode" port="10587" debug="false" auth="false" />
<webtop-api basePath="http://localhost:8080/webtop/api/com.sonicle.webtop.core/v1" bearer="WEBAPP_API_TOKEN" iddomain="NethServer" />
<fetch delay="60" />
</sonicle-pec-bridge>

0 comments on commit 0e07817

Please sign in to comment.