mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-26 17:49:15 +01:00
added system tasks
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
# lock
|
||||
touch /tmp/install-chromedriver.lock
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get update \
|
||||
&& apt-get install \
|
||||
unzip \
|
||||
&& \
|
||||
DL=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||
&& curl -sL "$DL" > /tmp/chrome.deb \
|
||||
&& apt install --no-install-recommends --no-install-suggests -y \
|
||||
/tmp/chrome.deb \
|
||||
&& CHROMIUM_FLAGS='--no-sandbox --disable-dev-shm-usage' \
|
||||
&& sed -i '${s/$/'" $CHROMIUM_FLAGS"'/}' /opt/google/chrome/google-chrome \
|
||||
&& BASE_URL=https://chromedriver.storage.googleapis.com \
|
||||
&& VERSION=$(curl -sL "$BASE_URL/LATEST_RELEASE") \
|
||||
&& curl -sL "$BASE_URL/$VERSION/chromedriver_linux64.zip" -o /tmp/driver.zip \
|
||||
&& unzip /tmp/driver.zip \
|
||||
&& chmod 755 chromedriver \
|
||||
&& mv chromedriver /usr/local/bin
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update
|
||||
apt-get install unzip
|
||||
DL=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
curl -sL "$DL" > /tmp/chrome.deb
|
||||
apt install --no-install-recommends --no-install-suggests -y /tmp/chrome.deb
|
||||
CHROMIUM_FLAGS='--no-sandbox --disable-dev-shm-usage'
|
||||
sed -i '${s/$/'" $CHROMIUM_FLAGS"'/}' /opt/google/chrome/google-chrome
|
||||
BASE_URL=https://chromedriver.storage.googleapis.com
|
||||
VERSION=$(curl -sL "$BASE_URL/LATEST_RELEASE")
|
||||
curl -sL "$BASE_URL/$VERSION/chromedriver_linux64.zip" -o /tmp/driver.zip
|
||||
unzip /tmp/driver.zip
|
||||
chmod 755 chromedriver
|
||||
mv chromedriver /usr/local/bin
|
||||
|
||||
# unlock global
|
||||
rm /tmp/install.lock
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
@@ -7,9 +10,9 @@ touch /tmp/install.lock
|
||||
touch /tmp/install-java.lock
|
||||
|
||||
# install java
|
||||
apt-get clean && \
|
||||
apt-get update --fix-missing && \
|
||||
apt-get install -y --fix-missing default-jdk
|
||||
apt-get clean
|
||||
apt-get update --fix-missing
|
||||
apt-get install -y --fix-missing default-jdk
|
||||
ln -s /usr/bin/java /usr/local/bin/java
|
||||
|
||||
# unlock
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
@@ -20,7 +23,7 @@ apt-get update && apt-get install -yq libgconf-2-4
|
||||
# Note: this installs the necessary libs to make the bundled version
|
||||
# of Chromium that Puppeteer
|
||||
# installs, work.
|
||||
RUN apt-get update \
|
||||
apt-get update \
|
||||
&& apt-get install -y wget gnupg \
|
||||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
{ # this ensures the entire script is downloaded #
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# lock global
|
||||
touch /tmp/install.lock
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail immediately if error
|
||||
set -e
|
||||
|
||||
# install node.js
|
||||
if [ "${CRAWLAB_SERVER_LANG_NODE}" = "Y" ];
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user