-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·29 lines (21 loc) · 929 Bytes
/
setup.sh
File metadata and controls
executable file
·29 lines (21 loc) · 929 Bytes
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
apt-get install -y fail2ban
apt-get install -y docker.io
apt-get install -y docker-compose
apt-get install -y certbot
mkdir -p secrets
# generate a password for the mongo database
tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1 > secrets/mongo_password
tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1 > secrets/mongo_root_password
cd metrics
docker build -t metrics .
cd ..
docker-compose up --detach
# certbot
mkdir -p certbot-challenge
certbot certonly --webroot -w /root/lt-server/certbot-challenge/ -d metrics.languagetransfer.org -m lt-certbot@tacosareawesome.com --agree-tos --no-eff-email
certbot certonly --webroot -w /root/lt-server/certbot-challenge/ -d downloads.languagetransfer.org -m lt-certbot@tacosareawesome.com --agree-tos --no-eff-email
sed 's/#del//g' -i nginx.conf
sed 's/#del//g' -i docker-compose.yml
docker-compose stop
docker-compose up --detach
crontab /root/lt-server/crontab