Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeschaekermann committed Feb 14, 2021
0 parents commit 35edc49
Show file tree
Hide file tree
Showing 75 changed files with 17,366 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.meteor/local
node_modules
16 changes: 16 additions & 0 deletions .ebextensions/00-docker-cleanup.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99-docker-cleanup.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# remove all stopped containers
docker rm $(docker ps -a -q)
# remove all unused images
docker images -q | while read line; do docker rmi $line 2>/dev/null; done
exit 0

commands:
01remove_backup:
command: rm -f /opt/elasticbeanstalk/hooks/appdeploy/post/99-docker-cleanup.sh.bak
8 changes: 8 additions & 0 deletions .ebextensions/01-files.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
files:
"/etc/nginx/conf.d/websocketupgrade.conf":
mode: "000755"
owner: root
group: root
content: |
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
4 changes: 4 additions & 0 deletions .ebextensions/02-commands.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
commands:
00001_add_privileged:
cwd: /tmp
command: 'sed -i "s/docker run .*-d/docker run --privileged --shm-size=1g -d/" /opt/elasticbeanstalk/hooks/appdeploy/enact/00run.sh'
65 changes: 65 additions & 0 deletions .ebextensions/03-efs-mount.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
commands:
01_mount:
command: '/tmp/mount-efs.sh'

files:
"/etc/nfs.map":
mode: "000644"
content : |
# remote local
gid 0 500
uid 0 500
"/tmp/mount-efs.sh":
mode: "000755"
content : |
#!/bin/bash

EFS_MOUNT_DIR="/efs_volume"
EC2_AVAILABILITY_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
EC2_REGION="`echo \"$EC2_AVAILABILITY_ZONE\" | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`"
EFS_FILE_SYSTEM_ID=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.EFS_FILE_SYSTEM_ID')

echo "Mounting EFS filesystem ${EFS_FILE_SYSTEM_ID} to directory ${EFS_MOUNT_DIR} ..."

echo 'Stopping NFS ID Mapper...'
service rpcidmapd status &> /dev/null
if [ $? -ne 0 ] ; then
echo 'rpc.idmapd is already stopped!'
else
service rpcidmapd stop
if [ $? -ne 0 ] ; then
echo 'ERROR: Failed to stop NFS ID Mapper!'
exit 1
fi
fi

echo 'Checking if EFS mount directory exists...'
if [ ! -d ${EFS_MOUNT_DIR} ]; then
echo "Creating directory ${EFS_MOUNT_DIR} ..."
mkdir -p ${EFS_MOUNT_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Directory creation failed!'
exit 1
fi
chmod 777 ${EFS_MOUNT_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Permission update failed!'
exit 1
fi
else
echo "Directory ${EFS_MOUNT_DIR} already exists!"
fi

mountpoint -q ${EFS_MOUNT_DIR}
if [ $? -ne 0 ]; then
echo "mount -t nfs4 -o nfsvers=4.1 ${EC2_AVAILABILITY_ZONE}.${EFS_FILE_SYSTEM_ID}.efs.${EC2_REGION}.amazonaws.com:/ ${EFS_MOUNT_DIR}"
mount -t nfs4 -o nfsvers=4.1 ${EC2_AVAILABILITY_ZONE}.${EFS_FILE_SYSTEM_ID}.efs.${EC2_REGION}.amazonaws.com:/ ${EFS_MOUNT_DIR}
if [ $? -ne 0 ] ; then
echo 'ERROR: Mount command failed!'
exit 1
fi
else
echo "Directory ${EFS_MOUNT_DIR} is already a valid mountpoint!"
fi

echo 'EFS mount complete.'
7 changes: 7 additions & 0 deletions .ebextensions/04-nginx-extra.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 100M;
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules/

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

.environment
Dockerfile.local

edf_files/
**/.DS_Store
17 changes: 17 additions & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1 change: 1 addition & 0 deletions .meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
53 changes: 53 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Server-side component of the `meteor shell` command

accounts-base
stylus@=2.513.14
ian:accounts-ui-bootstrap-3
accounts-password
aldeed:autoform
aldeed:simple-schema
aldeed:collection2
dburles:collection-helpers
alanning:roles
yogiben:admin
mizzao:jquery-ui
twbs:bootstrap
materialize:materialize
fortawesome:fontawesome
iron:router
session
msavin:mongol
ongoworks:security
reywood:publish-composite
todda00:collection-revisions
meteorblackbelt:force-ssl
aslagle:reactive-table
mizzao:autocomplete
underscore
softwarerero:accounts-t9n
reactive-dict
sokki:impersonate
check
yogiben:pretty-email
matb33:collection-hooks
helfer:minimongo-index
mizzao:user-status
sacha:spin
francocatena:status
2 changes: 2 additions & 0 deletions .meteor/platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
146 changes: 146 additions & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
[email protected]
[email protected]
alanning:[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
[email protected]
anti:[email protected]
aslagle:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
cfs:[email protected]
[email protected]
cmather:[email protected]
[email protected]
dandv:[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
fortawesome:[email protected]
fourseven:[email protected]
francocatena:[email protected]
[email protected]
[email protected]
helfer:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
ian:[email protected]
[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
matb33:[email protected]
materialize:[email protected]
[email protected]
[email protected]
meteorblackbelt:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorspark:[email protected]
meteortoys:[email protected]
mfactory:[email protected]
[email protected]
[email protected]
[email protected]
mizzao:[email protected]
mizzao:[email protected]
mizzao:[email protected]
mizzao:[email protected]
mizzao:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
momentjs:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
msavin:[email protected]
[email protected]
[email protected]
[email protected]
ongoworks:[email protected]
[email protected]
[email protected]
raix:[email protected]
raix:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
reywood:[email protected]
[email protected]
sacha:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
softwarerero:[email protected]
sokki:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
tap:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
todda00:[email protected]
[email protected]
twbs:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
yogiben:[email protected]
yogiben:[email protected]
zimme:[email protected]
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM XXXXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/crowdeeg:latest

EXPOSE 3000
19 changes: 19 additions & 0 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM johnnyutahio/meteor-launchpad:latest

MAINTAINER Mike Schaekermann <[email protected]>

RUN apt-get update \
&& apt-get install -y curl wget build-essential vim nano nfs-common

# WFDB software package
# https://www.physionet.org/physiotools/wfdb-linux-quick-start.shtml
RUN wget https://www.physionet.org/physiotools/wfdb.tar.gz \
&& mkdir wfdb \
&& tar xfvz wfdb.tar.gz -C wfdb --strip-components 1 \
&& cd wfdb \
&& ./configure && make install \
&& cd .. && rm -rf wfdb && rm -f wfdb.tar.gz

ADD container_start.sh $APP_BUNDLE_DIR/bundle/

CMD ["sh", "./container_start.sh"]
Loading

0 comments on commit 35edc49

Please sign in to comment.