12joan / twitter-client

A temporary Twitter client for fetching recent tweets for use while Twitter is closed to guest users
The Unlicense
26 stars 5 forks source link

installing without docker #12

Closed us3r1d closed 1 year ago

us3r1d commented 1 year ago

I set this up on a Rocky Linux host to run directly (i.e. without Docker). Here are the steps to do that, if anyone else wants to go that route:

yum install -y redis

systemctl enable redis.service
systemctl start redis.service

useradd 12jtc
su - 12jtc

wget https://nodejs.org/dist/v20.4.0/node-v20.4.0-linux-x64.tar.gz
tar -zxvf node-v20.4.0-linux-x64.tar.gz

export PATH=~/node-v20.4.0-linux-x64/bin:$PATH

git clone https://github.com/12joan/twitter-client.git

cd twitter-client
npm install

exit

nano -w /etc/systemd/system/12jtc.service
## BEGIN
[Unit]
Description=12Joan Twitter-Client
After=syslog.target
After=network.target

[Service]
Type=simple

# set user and group
User=12jtc
Group=12jtc

# configure location
WorkingDirectory=/home/12jtc/twitter-client
ExecStart=/bin/bash -c "PATH=~/node-v20.4.0-linux-x64/bin:$PATH NODE_ENV=production exec ts-node /home/12jtc/twitter-client/src/server.ts"

Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target
## END

systemctl enable 12jtc.service
systemctl start 12jtc.service
us3r1d commented 1 year ago

If you'd like, I can do the edits to either add this as part of README.md or make a docs/ subdirectory and add it there.

However you'd like, really.

12joan commented 1 year ago

Can you try creating a Wiki page? I think it should be editable by anyone now.

us3r1d commented 1 year ago

Done.

Thanks again for setting this up.

12joan commented 1 year ago

Thanks agagin for your contributions! :heart: