Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lzet committed Mar 16, 2017
1 parent ce36bf5 commit 3fd6a4f
Show file tree
Hide file tree
Showing 151 changed files with 4,316 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ---> Vim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~

# ---> Rails
*.rbc
capybara-*.html
.rspec
/log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/public/system
/coverage/
/spec/tmp
**.orig
rerun.txt
pickle-email-*.html

# TODO Comment out these rules if you are OK with secrets being uploaded to the repo
config/initializers/secret_token.rb
# config/secrets.yml

## Environment normalisation:
/.bundle
/vendor/bundle

# these should all be checked in to normalise the environment:
# Gemfile.lock, .ruby-version, .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# if using bower-rails ignore default bower_components path bower.json files
/vendor/assets/bower_components
*.bowerrc
bower.json

# Ignore pow environment settings
.powenv

# ---> Ruby
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

## Specific to RubyMotion:
.dat*
.repl_history
build/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalisation:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

30 changes: 30 additions & 0 deletions Dockerfile.postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ruby:2.3-slim
LABEL maintainer="lzet.name"
LABEL description="My Finance System"
LABEL version="1.0"

WORKDIR /usr/src

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libsqlite3-dev

COPY . /usr/src/
COPY Gemfile.postgres /usr/src/Gemfile
COPY config/database.postgres.yml /usr/src/config/database.yml
RUN bundle install

ENV RAILS_ENV=production
ENV SECRET_KEY_BASE=7b0c49b5827736876e8553cb7c93aba5396d524525797a1650383e108dd50b536e68798eb3f594818ab5686d6a55d774db00e0ab171e6ab3478f1ff3a2d67db0
ENV POSTGRESQL_DATABASE=mf1n5
ENV POSTGRESQL_USERNAME=mf1n5
ENV POSTGRESQL_PASSWORD=mf1n5password
ENV POSTGRESQL_ADDRESS=192.168.0.100
ENV PORT=3001

ENV RAILS_SERVE_STATIC_FILES=true

RUN bundle exec rails assets:precompile

CMD ./startserver.sh

EXPOSE 3001

24 changes: 24 additions & 0 deletions Dockerfile.sqlite
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ruby:2.3-slim
LABEL maintainer="lzet.name"
LABEL description="My Finance System"
LABEL version="1.0"

WORKDIR /usr/src

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libsqlite3-dev

COPY . /usr/src/
RUN bundle install

ENV RAILS_ENV=production
ENV SECRET_KEY_BASE=7b0c49b5827736876e8553cb7c93aba5396d524525797a1650383e108dd50b536e68798eb3f594818ab5686d6a55d774db00e0ab171e6ab3478f1ff3a2d67db0
ENV PORT=3001

ENV RAILS_SERVE_STATIC_FILES=true

RUN bundle exec rails assets:precompile

CMD ./startserver.sh

EXPOSE 3001

63 changes: 63 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
source 'https://rubygems.org'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'bootstrap-sass'
gem 'bootstrap-datepicker-rails'
gem 'devise'
gem 'devise-i18n'
# gem 'haml'
gem 'slim'
gem 'ionicons-rails'
gem 'timezone'
gem 'chartkick'
gem 'groupdate'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Loading

0 comments on commit 3fd6a4f

Please sign in to comment.