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
@@ -0,0 +1,3 @@
.git
.meteor/local
node_modules
16 changes: 16 additions & 0 deletions .ebextensions/00-docker-cleanup.config
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@
local
53 changes: 53 additions & 0 deletions .meteor/packages
@@ -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.

meteor-base@1.3.0 # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.4.2 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.1.3 # Meteor's client-side reactive programming library

standard-minifier-css@1.4.0 # CSS minifier run for production mode
standard-minifier-js@2.3.1 # JS minifier run for production mode
es5-shim@4.7.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.10.6 # Enable ECMAScript2015+ syntax in app code
shell-server@0.3.1 # 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
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
@@ -0,0 +1 @@
METEOR@1.6.1.1
146 changes: 146 additions & 0 deletions .meteor/versions
@@ -0,0 +1,146 @@
accounts-base@1.4.2
accounts-password@1.5.1
alanning:roles@1.2.16
aldeed:autoform@5.5.1
aldeed:collection2@2.5.0
aldeed:simple-schema@1.3.3
aldeed:tabular@1.4.2
aldeed:template-extension@4.0.0
allow-deny@1.1.0
anti:i18n@0.4.3
aslagle:reactive-table@0.8.45
autoupdate@1.4.0
babel-compiler@7.0.8
babel-runtime@1.2.2
base64@1.0.11
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.4.0
caching-compiler@1.1.11
caching-html-compiler@1.1.2
callback-hook@1.1.0
cfs:http-methods@0.0.32
check@1.3.1
cmather:handlebars-server@2.0.0
coffeescript@1.0.17
dandv:caret-position@2.1.1
dburles:collection-helpers@1.1.0
ddp@1.4.0
ddp-client@2.3.2
ddp-common@1.4.0
ddp-rate-limiter@1.0.7
ddp-server@2.1.2
deps@1.0.12
diff-sequence@1.1.0
dynamic-import@0.3.0
ecmascript@0.10.8
ecmascript-runtime@0.5.0
ecmascript-runtime-client@0.6.2
ecmascript-runtime-server@0.5.0
ejson@1.1.0
email@1.2.3
es5-shim@4.7.3
fortawesome:fontawesome@4.7.0
fourseven:scss@4.5.4
francocatena:status@1.5.3
geojson-utils@1.0.10
handlebars@1.0.7
helfer:minimongo-index@0.0.1
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.1
ian:accounts-ui-bootstrap-3@1.2.89
id-map@1.1.0
iron:controller@1.0.12
iron:core@1.0.11
iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.1.2
iron:url@1.1.0
jquery@1.11.11
launch-screen@1.1.1
less@2.7.12
livedata@1.0.18
localstorage@1.2.0
logging@1.1.20
matb33:collection-hooks@0.7.15
materialize:materialize@0.100.2
meteor@1.8.6
meteor-base@1.3.0
meteorblackbelt:force-ssl@1.0.4
meteorhacks:meteorx@1.0.2
meteorhacks:unblock@1.1.0
meteorspark:util@0.2.0
meteortoys:toykit@4.0.1
mfactory:admin-lte@0.0.2
minifier-css@1.3.1
minifier-js@2.3.4
minimongo@1.4.4
mizzao:autocomplete@0.5.1
mizzao:build-fetcher@0.2.0
mizzao:jquery-ui@1.11.4
mizzao:timesync@0.3.4
mizzao:user-status@0.6.8
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modules@0.11.6
modules-runtime@0.9.2
momentjs:moment@2.10.6
mongo@1.4.7
mongo-dev-server@1.1.0
mongo-id@1.0.7
mongo-livedata@1.0.12
msavin:mongol@4.0.1
npm-bcrypt@0.9.3
npm-mongo@2.2.34
observe-sequence@1.0.16
ongoworks:security@2.1.0
ordered-dict@1.1.0
promise@0.10.2
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.2.0
retry@1.1.0
reywood:publish-composite@1.4.2
routepolicy@1.0.13
sacha:spin@2.3.1
server-render@0.3.0
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.3.1
shim-common@0.1.0
socket-stream-client@0.1.0
softwarerero:accounts-t9n@1.1.7
sokki:impersonate@1.0.1
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.10
standard-minifier-css@1.4.1
standard-minifier-js@2.3.3
stylus@2.513.14
tap:i18n@1.7.0
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
todda00:collection-revisions@0.2.1
tracker@1.1.3
twbs:bootstrap@3.3.6
ui@1.0.13
underscore@1.0.10
url@1.2.0
webapp@1.5.0
webapp-hashing@1.0.9
yogiben:admin@1.2.8
yogiben:pretty-email@0.0.7
zimme:active-route@2.3.2
3 changes: 3 additions & 0 deletions Dockerfile
@@ -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
@@ -0,0 +1,19 @@
FROM johnnyutahio/meteor-launchpad:latest

MAINTAINER Mike Schaekermann <mikeschaekermann@gmail.com>

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"]

0 comments on commit 35edc49

Please sign in to comment.