Brilliant! I knew about setting system properties, but I didn't know ${var}
would pull from the unix environment!

What we're doing now is tomee-exec->deb package->sftp to ubuntu->freight
script adds to apt repo->apt installation on linux system. The deb script
creates a user/group after the artifact id, then installs a systemd unit to
control the process. We then just point systemd at an environment file with
all of the secret stuff:


[Unit]
Description=${project.artifactId} ${project.version}
After=network.target

[Service]
EnvironmentFile=/etc/default/${project.artifactId}
Type=simple
WorkingDirectory=/opt/${project.artifactId}
ExecStart=/usr/bin/java -jar
/opt/${project.artifactId}/${project.artifactId}-exec.jar
User=${project.artifactId}
Group=${project.artifactId}
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Reply via email to