Skip to content

Girder setup on aws

Satrajit Ghosh edited this page Sep 10, 2019 · 5 revisions

install pre-requisites

apt-get update
apt-get install -y git docker-compose python3.7 nginx vim fail2ban

Setup nginx

vi /etc/nginx/sites-enabled/girder.dandiarchive.org

edit nginx site file

server {
       listen 80;
       server_name    girder.dandiarchive.org;
       location / {
          proxy_pass http://localhost:8080/;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
}

restart nginx

service nginx restart
service nginx status

setup lets encrypt

apt-get install -y software-properties-common
add-apt-repository universe
add-apt-repository -y ppa:certbot/certbot
apt-get update
apt-get install -y certbot python-certbot-nginx
certbot --nginx

make/mount data volume

if first time

mkfs -t xfs /dev/xvdf

just remount

mkdir /data
mount /dev/xvdf /data

if first time

mkdir /data/db

download and setup girder

git clone https://github.com/girder/girder.git
cd girder

edit docker-compose.yml to use Dockerfile.py3 and to mount a host volume.

mongodb:
  image: mongo:3.4
  ports:
    - "27017"
  volumes:
    - "/data/db:/data/db"

girder:
  build: .
  dockerfile: Dockerfile.py3

bring up girder

docker-compose up -d

test configuration

register a new user (becomes admin)
[TODO] setup mail service

aws + google domain specific settings

  • setup an ec2 instance with an elastic ip and open ports 22, 80, and 443
  • on google domain add an A record for girder and point to the elastic ip