first commit

This commit is contained in:
root 2017-11-03 19:46:05 +00:00
commit 88afe50ff1
6 changed files with 113 additions and 0 deletions

3
.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["env"]
}

3
.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"allow_root": true
}

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
# git
.git/
.gitignore

49
.gitignore vendored Normal file
View File

@ -0,0 +1,49 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# OS & IDE
.DS_Store
# Ignore bundler config.
/.bundle
# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp
/config/cap.yml
/app/assets/templates/generated/
# Ignore bower components
/vendor/assets/bower_components/
/node_modules
/vendor/assets/javascripts/app.js
/vendor/assets/javascripts/compiled.js
/vendor/assets/javascripts/transpiled.js
vendor/assets/javascripts/transpiled.js.map
/vendor/assets/javascripts/compiled.min.js
/vendor/assets/javascripts/lib.js
/vendor/assets/javascripts/templates.js
/vendor/assets/stylesheets/app.css
/vendor/assets/stylesheets/app.css.map
/.sass-cache
# Ignore ENV variables config
.env
.ssh
dump.rdb
# Ignore compiled assets
/public/assets
# Ignore user uploads
/public/uploads/*
!/public/uploads/.keep

37
Dockerfile Normal file
View File

@ -0,0 +1,37 @@
FROM node:6-alpine
RUN apk -U upgrade \
&& apk add -t build-dependencies \
git \
curl-dev \
wget \
ruby-dev \
build-base \
&& apk add \
tzdata \
ruby \
ruby-io-console \
ruby-json \
ruby-bigdecimal \
&& git clone https://github.com/standardnotes/web.git /standardnotes \
&& gem install -N rails --version "$RAILS_VERSION" \
&& echo 'gem: --no-document' >> ~/.gemrc \
&& cp ~/.gemrc /etc/gemrc \
&& chmod uog+r /etc/gemrc \
&& rm -rf ~/.gem \
&& cd /standardnotes \
&& bundle config --global silence_root_warning 1 \
&& bundle install --system \
&& npm install \
&& npm install -g bower grunt \
&& bundle exec rake bower:install \
&& grunt \
&& apk del build-dependencies \
&& rm -rf /tmp/* /var/cache/apk/* /tmp/* /root/.gnupg /root/.cache/ /standardnotes/.git
COPY docker /docker
EXPOSE 3000
ENTRYPOINT ["/docker/entrypoint"]
CMD ["start"]

18
docker/entrypoint Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env sh
CMD=$1
case "$CMD" in
'start' )
echo `pwd`
rm -f /data/src/tmp/pids/server.pid
cd /standardnotes/
bundle exec rails s -b 0.0.0.0
;;
* )
# Run custom command. Thanks to this line we can still use
# "docker run our_image /bin/bash" and it will work
exec "$@"
;;
esac