The scope of this project is to maintain a remote shake data repository updated, searching, at time interval, for new shake data available on the net.
When a file is discovered to be changed on the remote repository by external users, it is skipped.
First, clone the git repositry:
$ git clone https://github.com/INGV/shakemap-input-eu.git
$ cd shakemap-input-eu
$ docker build --no-cache --pull --build-arg ENV_UID=$(id -u) --build-arg ENV_GID=$(id -g) --tag ingv/shakemap-input-eu .
$ git remote add origin_ssh [email protected]:INGV/shakemap-input-eu.git
Create an ssh_key
directory with valid ssh key to push
; the ssh key must be called id_rsa__origin_ssh
like below:
$ ls -l ssh_key/
total 12
-rw------- 1 shake shake 2602 Feb 7 14:26 id_rsa__origin_ssh
-rw-r--r-- 1 shake shake 571 Feb 7 14:26 id_rsa__origin_ssh.pub
$
after that, create a ssh_key/config
file with this contents:
$ cat ssh_key/config
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa__origin_ssh
$ docker run -it --rm -v $(pwd):/opt/shakemap-input-eu -v $(pwd)/ssh_key:/home/shake/.ssh ingv/shakemap-input-eu 1d /opt/shakemap-input-eu --end_time 2020-10-31
crontab
file
# shakemap-input-e
*/15 * * * * (cd /home/shake/gitwork/_INGV/shakemap-input-eu && docker run --rm -v $(pwd):/opt/shakemap-input-eu -v $(pwd)/ssh_key:/home/shake/.ssh ingv/shakemap-input-eu 1d /opt/shakemap-input-eu --end_time 2020-11-06) >> /tmp/shakemap-input-eu.log 2>&1
00 00 * * * mv /tmp/shakemap-input-eu.log /tmp/shakemap-input-eu.yesterday.log
Thanks to your contributions!
Here is a list of users who already contributed to this repository:
(c) 2022 Valentino Lauciani valentino.lauciani[at]ingv.it
(c) 2022 Sergio Bruni sergio.bruni[at]ingv.it
Istituto Nazionale di Geofisica e Vulcanologia, Italia