Skip to content

Instantly share code, notes, and snippets.

@sarkrui
Created May 30, 2023 03:53
Show Gist options
  • Save sarkrui/97a3e867014663aab91f7eb6bc402147 to your computer and use it in GitHub Desktop.
Save sarkrui/97a3e867014663aab91f7eb6bc402147 to your computer and use it in GitHub Desktop.
Deploy Amazon Price Tracker
# Installing dependencies
DEBIAN_FRONTEND=noninteractive && \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub > /usr/share/keyrings/chrome.pub && \
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/chrome.pub] http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list && \
apt update -y && \
apt install -y google-chrome-stable
apt install xvfb -y
# Install miniconda
cd /tmp
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-x86_64.sh
sudo chmod +x Miniconda3-py310_22.11.1-1-Linux-x86_64.sh
export DISPLAY=:1
Xvfb $DISPLAY -screen $DISPLAY 1920x1080x8 &
sudo -i
conda activate base
cd projects/Amazon-Price-Tracker/
pip3 install -r requirements.txt
/root/miniconda3/bin/python3 amazon-uc.py
*/15 * * * * /root/miniconda3/bin/conda run -n base /root/projects/scripts/uc >> /root/projects/scripts/log/uc.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment