-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Martin Müller edited this page Feb 1, 2018
·
12 revisions
A few things to note:
- Needs at least a t2.small instance to work properly, however should also work on a micro
- For this installation to work make sure ports 80 and 433 are open to public in the AWS security group attached to the EC2, and the respective domains for Elasticserach and the API are registered on the DNS provider and are pointing to the correct IP on EC2.
Instructions
- Create SSL keypair
sh-keygen -t rsa -b 4096 -C "example@email.com"
- Add public key to deploy keys in github repository
- Set secrets in
secrets.list
cp secrets.list.example secrets.list
- Install docker and docker-compose
- Run certbot, get certificates for domains
sudo docker run -it -p 443:443 -p 80:80 --name certbot -v /etc/letsencrypt:/etc/letsencrypt -v /var/lib/letsencrypt-lib/:/var/lib/letsencrypt certbot/certbot certonly
- Create elasticsearch passwd
sudo htpasswd elasticsearch.pwd elasticsearch
- Deploy
source build_production.sh
Old solution: SSL certificate without docker Following this.
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx -y
sudo certbot --nginx -d api-stg.crowdbreaks.org
This should automatically modify the nginx config as well as add all necessary certificates. The current certificate will need to be renewed every 2 months. Run /opt/letsencrypt/letsencrypt-auto —debug or set up a cron job to renew certificates.