aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripts/agl-deploy-ci-instance.sh
blob: e1e8dbee2ee4daa95bfe97d77caf33901f5aeed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# (C) Jan-Simon Moeller (dl9pf@gmx.de)
# GPLv2


set -x

echo "Run script from toplevel directory."

docker stop agl-jta-prod
docker rm -v agl-jta-prod
docker rm agl-jta-prod

docker images | grep "<none>" | awk '{ print "docker rmi " $3 }' | bash


# small adaptions for deployment:
sed -i -e "s#ftp.us.d#httpredir.d#g" Dockerfile
sed -i -e "s#HTTP_PORT=8080#HTTP_PORT=8082#g" frontend-install/jenkins.cfg

./install.sh

#sudo docker create -it -p 8082:8082 -p 50002:50002 -v /srv/JTA-USERDATA:/userdata --env JENKINS_OPTS="--httpPort=8082" --env JENKINS_SLAVE_AGENT_PORT=50002 --name agl-jta-prod agl-jta
sudo docker create -it -p 8082:8082 -p 50002:50002 -v /root/AGL-JTA/userdata:/userdata --env JENKINS_OPTS="--httpPort=8082" --env JENKINS_SLAVE_AGENT_PORT=50002 --name agl-jta-prod agl-jta

CONTAINER_ID=`sudo docker ps -l -q`
echo $CONTAINER_ID > container_id

sleep 1
docker start agl-jta-prod