Last active
July 7, 2020 08:49
-
-
Save ajhalili2006/5fac9c422c80eaa96b01cde1823eacce to your computer and use it in GitHub Desktop.
An simple script to cat stuff to systemd in Docker containers, as per https://docs.rocket.chat/installation/manual-installation/ubuntu#configure-the-rocket-chat-service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << EOF |sudo tee -a /lib/systemd/system/rocketchat.service | |
[Unit] | |
Description=The Rocket.Chat server | |
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target | |
[Service] | |
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=rocketchat | |
User=rocketchat | |
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000 | |
[Install] | |
WantedBy=multi-user.target | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment