diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..ac47fcd --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,6 @@ +[bumpversion] +files = VERSION .bumpversion.cfg +commit = True +tag = False +current_version = 0.0.1 + diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..f3c2a9b --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,7 @@ +--- +engines: + fixme: + enabled: true +ratings: + paths: [] +exclude_paths: [] diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bd4aa32 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +etc/* +Makefile +script/* diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c7bd957 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,28 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +trim_trailing_whitespace = true +charset = utf-8 +insert_final_newline = false +max_line_length = 80 + +[*.{py,sh,sql}] +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false + +# Tabs +[*.{less,css}] +indent_style = tab + +[Vagrantfile] +indent_style = tab + +[Makefile] +indent_style = tab +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..383303e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,134 @@ +# Path-based git attributes +# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html + +## Test/documentation + +# Ignore all test and documentation with "export-ignore". +/.gitattributes export-ignore +/.githooks export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/.travis.yaml export-ignore +/phpunit.xml.dist export-ignore +/.scrutinizer.yml export-ignore +/.scrutinizer.yaml export-ignore +/tests export-ignore + +## Merging +CHANGELOG.md merge=union + +## Line endings + +### Automatic + +# Handle line endings automatically for files detected as text +# and leave all files detected as binary untouched. +* text=auto eol=lf + +### Text (should be normalized, convert crlf => lf) + +# Source +*.php text eol=lf +*.css text eol=lf +*.sass text eol=lf +*.scss text eol=lf +*.less text eol=lf +*.styl text eol=lf +*.js text eol=lf +*.coffee text eol=lf +*.json text eol=lf +*.htm text eol=lf +*.html text eol=lf +*.xml text eol=lf +*.svg text eol=lf +*.txt text eol=lf +*.ini text eol=lf +*.inc text eol=lf +*.pl text eol=lf +*.rb text eol=lf +*.py text eol=lf +*.scm text eol=lf +*.sql text eol=lf +*.sh text eol=lf +*.bat text eol=lf + +# Templates +*.ejs text eol=lf +*.hbt text eol=lf +*.jade text eol=lf +*.haml text eol=lf +*.hbs text eol=lf +*.dot text eol=lf +*.tmpl text eol=lf +*.phtml text eol=lf + +# App config +.env text eol=lf +.env.example text eol=lf + +# Server config +.htaccess text eol=lf + +# Git config +.gitattributes text eol=lf +.gitignore text eol=lf + +# Code analysis config +.jshintrc text eol=lf +.jscsrc text eol=lf +.jshintignore text eol=lf +.csslintrc text eol=lf + +# Misc config +*.yaml text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +.editorconfig text eol=lf + +# Build config +composer.lock text eol=lf +*.npmignore text eol=lf +*.bowerrc text eol=lf + +# Heroku +Procfile text eol=lf +.slugignore text eol=lf + +# Documentation +*.md text eol=lf +LICENSE text eol=lf +AUTHORS text eol=lf + +# Vagrant +Vagrantfile eol=lf + +# Scripts +bin/* text eol=lf + +### Binary (left untouched) + +# (binary is a macro for -text -diff) +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.mov binary +*.mp4 binary +*.mp3 binary +*.mwb binary +*.flv binary +*.fla binary +*.swf binary +*.gz binary +*.zip binary +*.7z binary +*.rar binary +*.ttf binary +*.eot binary +*.woff binary +*.woff2 binary +*.otf binary +*.pyc binary +*.pdf binary +*.bz2 binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..f6a2e2b --- /dev/null +++ b/.mailmap @@ -0,0 +1,4 @@ +@slovacus luis mayta luis alberto mayta +@slovacus Luis Alberto Mayta Mamani +@slovacus luis alberto mayta +@slovacus Lmayta Luis Alberto Mayta M diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..792fa03 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,54 @@ +- repo: git@github.com:pre-commit/pre-commit-hooks + sha: 5da199bb8d60f764c0f77a20b0a1dc3a7640bcdd + hooks: + - id: detect-private-key + files: ^(?!\.?git-crypt) + - id: check-merge-conflict + - id: trailing-whitespace + files: ^tf|-|\.(py|tfvars|tf|tfenv|env|yml|yaml|pem|key|mock)$ + - id: end-of-file-fixer + files: ^tf|-|\.(py|tfvars|tf|tfenv|env|yml|yaml|pem|key|mock)$ + - id: check-added-large-files + - id: check-case-conflict + - id: check-json + - id: check-xml + - id: check-yaml + - id: check-case-conflict + - id: check-ast + - id: debug-statements + - id: autopep8-wrapper + args: + - -i + - --ignore=E501 + - id: double-quote-string-fixer + - id: check-docstring-first + - id: pretty-format-json + - id: debug-statements + - id: requirements-txt-fixer + - id: name-tests-test +- repo: git://github.com/pre-commit/mirrors-pylint + sha: v1.6.4 + hooks: + - id: pylint + args: + - --rcfile=.pylintrc +- repo: git://github.com/pre-commit/mirrors-scss-lint + sha: v0.50.2 + hooks: + - id: scss-lint + files: \.(scss)$ +- repo: git@github.com:pre-commit/pre-commit + sha: ba09a2dfffff2bfb8edbdc206354b6c1fae4ef8d + hooks: + - id: validate_config + - id: validate_manifest +- repo: git://github.com/FalconSocial/pre-commit-python-sorter + sha: 5991d2aea26858d3c3538e0b4e09255b6b99413e + hooks: + - id: python-import-sorter + args: + - --silent-overwrite +- repo: git://github.com/detailyang/pre-commit-shell + sha: 1fdffa0434cde2b87f19ad258201d3e81481af5f + hooks: + - id: shell-lint diff --git a/.projectile b/.projectile new file mode 100644 index 0000000..66cb228 --- /dev/null +++ b/.projectile @@ -0,0 +1,8 @@ +-/log +-/tmp +-/.git +-/.vagrant +-/auto-save-list +-*.cache +-*.pyc +-projectile-bookmarks.eld diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..3f0ab3b --- /dev/null +++ b/.pylintrc @@ -0,0 +1,361 @@ +[MASTER] + +# Specify a configuration file. +#rcfile= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Profiled execution. +# profile=no + +# Add files or directories to the blacklist. They should be base names, not +# paths. +ignore=migrations,settings.py,settings_openshift.py,settings_test.py,settings_test_mysql.py,settings_test_postgresql.py,settings_test_sqlite.py,.git,test-repos,repos,settings_test_nose.py + +# Pickle collected data for later comparisons. +persistent=yes + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + + +[MESSAGES CONTROL] + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time. See also the "--disable" option for examples. +#enable= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +# C0111 Missing docstring +# I0011 Warning locally suppressed using disable-msg +# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments. +# W0613 Unused argument %r Used when a function or method argument is not used. +# R0201 Method could be a function +# E1101 does not work well on metaclasses like Django models or Mechanize browser +# E1103 does not work with WSGIRequest or file objects +# W0703 Catching too general exception Exception +# R0921,R0922 Is raised when abstract classes are used in different module +# E1002 Produces lot of false positives with Django 1.5 +# R0401(cyclic-import) we have too many of them +# C0411(wrong-import-order) should be probably fixed +# E1102: _ is not callable +# C0103: Invalid name +# C0301: Line too long +# C0302: Too many lines in module +# R0903: Too few public method +# R0904: Too many public methods +# R0912: Too many branches +# R0913: Too many arguments +# R0914: Too many local variables +# R0915: Too many statements +# R0201: Method could be a function +# W0142: Used * or ** magic +# W0231: __init__ method from base class is not called +# W0232: Class has no __init__ method +# W0212: Access to a protected member _meta of a client class + +disable=import-error,missing-super-argument,too-few-public-methods, + no-member,no-init,old-style-class,C0111,I0011,W0142,W0613, + E1103,E1101,E1102,R0401,R0921,R0922,E1002,C0411,W0703,R0201, + C0301,W0231,W0232,W0212 + + +[REPORTS] + +# Set the output format. Available formats are text, parseable, colorized, msvs +# (visual studio) and html. You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Put messages in a separate file for each module / package specified on the +# command line instead of printing them on stdout. Reports (if any) will be +# written in a file name "pylint_global.[txt|html]". +files-output=no + +# Tells whether to display a full report or only the messages +reports=no + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Add a comment according to your evaluation note. This is used by the global +# evaluation report (RP0004). +# comment=no + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} + + +[TYPECHECK] + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus extisting member attributes cannot be deduced by static analysis +ignored-modules= + +# List of classes names for which member attributes should not be checked +# (useful for classes with attributes dynamically set). +ignored-classes=SQLObject + +# When zope mode is activated, add a predefined set of Zope acquired attributes +# to generated-members. +# zope=no + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E0201 when accessed. Python regular +# expressions are accepted. +generated-members=objects,DoesNotExist,id,pk,_meta,base_fields,context + + +[VARIABLES] + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +# dummy-variables-rgx=dummy,_ + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + + +[FORMAT] + +# Maximum number of characters on a single line. +max-line-length=80 + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + +# List of optional constructs for which whitespace checking is disabled +no-space-check=trailing-comma,dict-separator + +# Maximum number of lines in a module +max-module-lines=1600 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,XXX,TODO + + +[SIMILARITIES] + +# Minimum lines number of a similarity. +min-similarity-lines=4 + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=no + + +[BASIC] + +# Required attributes for module, separated by a comma +# required-attributes= + +# List of builtins function names that should not be used, separated by a comma +bad-functions=map,filter,apply,input,file + +# Good variable names which should always be accepted, separated by a comma +good-names=_,i,j,k,e,qs,pk,setUp,tearDown,id + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Regular expression matching correct function names +function-rgx=[a-zA_][a-zA-Z0-9_]{2,70}$ + +# Naming hint for function names +function-name-hint=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression matching correct variable names +variable-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Naming hint for variable names +variable-name-hint=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression matching correct constant names +const-rgx=(([A-Z_][A-Z0-9_]*)|([a-z_][a-z0-9_]*)|(__.*__)|register|urlpatterns)$ + +# Naming hint for constant names +const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression matching correct attribute names +attr-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Naming hint for attribute names +attr-name-hint=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression matching correct argument names +argument-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Naming hint for argument names +argument-name-hint=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression matching correct class attribute names +class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Naming hint for class attribute names +class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Regular expression matching correct inline iteration names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Naming hint for inline iteration names +inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ + +# Regular expression matching correct class names +class-rgx=[A-Z_][a-zA-Z0-9_]+$ + +# Naming hint for class names +class-name-hint=[A-Z_][a-zA-Z0-9]+$ + +# Regular expression matching correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Naming hint for module names +module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression matching correct method names +method-rgx=[a-z_][a-zA-Z0-9_]{2,70}$ + +# Naming hint for method names +method-name-hint=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=__.*__|_.* + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[IMPORTS] + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=regsub,TERMIOS,Bastion,rexec + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=10 + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.* + +# Maximum number of locals for function / method body +max-locals=20 + +# Maximum number of return / yield for function / method body +max-returns=8 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of statements in function / method body +max-statements=50 + +# Maximum number of parents for a class (see R0901). +max-parents=12 + +# Maximum number of attributes for a class (see R0902). +max-attributes=25 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=0 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=110 + + +[CLASSES] + +# List of interface methods to ignore, separated by a comma. This is used for +# instance to not check methods defines in Zope's Interface base class. +# ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e5496ab --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +@slovacus diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8ef3efd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# Change Log +All notable changes to this project will be documented in this file. +This file uses change log convention from [Keep a CHANGELOG](http://keepachangelog.com). + +## [Unreleased][unreleased] + + +[unreleased]: https://github.com/dgnest/dockerfiles/compare/0.0.1...HEAD +[0.0.1]: https://github.com/dgnest/dockerfiles/compare/0.0.0...0.0.1 + +[CHANGELOG.md]: CHANGELOG.md +[CONTRIBUTING.md]: CONTRIBUTING.md +[LICENCE]: LICENCE +[README.md]: README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d263e6a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# How to contribute + +Prerequisites: + +- Familiarity with [pull requests](https://help.github.com/articles/using-pull-requests) and [issues](https://guides.github.com/features/issues/). +- Knowledge of [Markdown](https://help.github.com/articles/markdown-basics/) for editing `.md` documents. + +In particular, this community seeks the following types of contributions: + +- **Ideas**: participate in an issue thread or start your own to have your voice +heard. +- **Resources**: submit a pull request to add to RESOURCES.md with links to related content. +- **Outline sections**: help us ensure that this repository is comprehensive. if +there is a topic that is overlooked, please add it, even if it is just a stub +in the form of a header and single sentence. Initially, most things fall into +this category. +- **Writing**: contribute your expertise in an area by helping us expand the included +content. +- **Copy editing**: fix typos, clarify language, and generally improve the quality +of the content. +- **Formatting**: help keep content easy to read with consistent formatting. + +# Conduct + +# Communication + +# Frequently Asked Questions + +*please add* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2740bbd --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, dgnest + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..399e525 --- /dev/null +++ b/Makefile @@ -0,0 +1,63 @@ +# Makefile for dockerfiles. + +# Configuration. +SHELL = /bin/bash +ROOT_DIR = $(shell pwd) +BIN_DIR = $(ROOT_DIR)/bin +DATA_DIR = $(ROOT_DIR)/var +SCRIPT_DIR = $(ROOT_DIR)/script + +WGET = wget + +# Bin scripts +CLEAN = $(shell) $(SCRIPT_DIR)/clean.sh +GVM = $(shell) $(SCRIPT_DIR)/gvm.sh +GRIP = $(shell) $(SCRIPT_DIR)/grip.sh +PYENV = $(shell) $(SCRIPT_DIR)/pyenv.sh +SETUP = $(shell) $(SCRIPT_DIR)/setup.sh +INSTALL = $(shell) $(SCRIPT_DIR)/install.sh +LINTCODE = $(shell) $(SCRIPT_DIR)/lintcode.sh +TEST = $(shell) $(SCRIPT_DIR)/test.sh +SYNC = $(shell) $(SCRIPT_DIR)/sync.sh +LINGUIST = $(shell) $(SCRIPT_DIR)/linguist.sh + +clean: + $(CLEAN) + + + +distclean: clean + rm -rf $(ROOT_DIR)/lib + rm -rf $(ROOT_DIR)/*.egg-info + rm -rf $(ROOT_DIR)/demo/*.egg-info + + +environment: + $(PYENV) + $(GVM) + $(INSTALL) + + +grip: + $(GRIP) + + +install: + $(INSTALL) + + +maintainer-clean: distclean + rm -rf $(BIN_DIR) + rm -rf $(ROOT_DIR)/lib/ + + +lintcode: + $(LINTCODE) + + +sync: + $(SYNC) + + +linguist: + $(LINGUIST) diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8e4d77 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Docker dockerfiles + + +[![Build Status](https://travis-ci.org/dgnest/dockerfiles.svg)](https://travis-ci.org/dgnest/dockerfiles) +[![Stories in Ready](https://badge.waffle.io/dgnest/dockerfiles.svg?label=ready&title=Ready)](http://waffle.io/dgnest/dockerfiles) +[![GitHub issues](https://img.shields.io/github/issues/dgnest/dockerfiles.svg)](https://github.com/dgnest/dockerfiles/issues) +[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENSE) + + + +Requirements +------------ + +None + + +## Dependencies + +none + +## License + +MIT + +## Changelog + +Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. + +## Contributing + +Please see [CONTRIBUTING](CONTRIBUTING.md) for details. + +## Credits + +Made with :heart: ️:coffee:️ and :pizza: by [dgnest][link-company]. +- [All Contributors][link-contributors] + +--- + + + +[link-company]: https://github.com/dgnest +[link-author]: https://github.com/luismayta +[link-contributors]: AUTHORS \ No newline at end of file diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8acdd82 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.1 diff --git a/etc/tmuxinator/dgnest-dockerfiles.yml b/etc/tmuxinator/dgnest-dockerfiles.yml new file mode 100644 index 0000000..d276527 --- /dev/null +++ b/etc/tmuxinator/dgnest-dockerfiles.yml @@ -0,0 +1,61 @@ +# ~/.tmuxinator/dgnest-dockerfiles.yml +name: dgnest-dockerfiles +root: <%= ENV["PROJECTS"] %>/docker/dgnest/dockerfiles +tmux_options: -2 +# Optional tmux socket +# socket_name: foo + +# Runs before everything. Use it to start daemons etc. +# pre: sudo /etc/rc.d/mysqld start +pre: + - make environment + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: logs + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +# Runs after everything. Use it to attach to tmux with custom options etc. +# post: tmux -CC attach -t dockerfiles + +windows: + - editor: + layout: even-horizontal + panes: + - editor: + - pyenv activate dgnest-dockerfiles + - <%= ENV["EDITOR"] %> + - docker: + - pyenv activate dgnest-dockerfiles + - docker: + - pyenv activate dgnest-dockerfiles + - python: + layout: main-vertical + panes: + - python: + - pyenv activate dgnest-dockerfiles + - ipython + - databases: + layout: main-vertical + panes: + - local: + - pyenv activate dgnest-dockerfiles + - test: + - pyenv activate dgnest-dockerfiles + - docker: + layout: main-vertical + panes: + - code: + - pyenv activate dgnest-dockerfiles + - test: + - pyenv activate dgnest-dockerfiles diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..444c7c5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +docker-compose==1.9.0 \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..d38b2f7 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,8 @@ +-r test.txt +bumpversion==0.5.3 +grip==4.3.2 +ipdb==0.10.1 +ipython==5.0.0 +ipython-genutils==0.1.0 +pre-commit==0.9.0 +pylint==1.4.4 diff --git a/requirements/stage.txt b/requirements/stage.txt new file mode 100644 index 0000000..9149df9 --- /dev/null +++ b/requirements/stage.txt @@ -0,0 +1 @@ +-r ../requirements.txt \ No newline at end of file diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..21b2489 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,3 @@ +-r ../requirements.txt +PyHamcrest==1.9.0 +tox==2.1.1 \ No newline at end of file diff --git a/script/bootstrap.sh b/script/bootstrap.sh new file mode 100755 index 0000000..a644e77 --- /dev/null +++ b/script/bootstrap.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +export PROJECT_NAME=dgnest-dockerfiles + +export PYTHON_VERSION=2.7.9 +export PYENV_NAME="${PROJECT_NAME}" + +export GVM_NAME="${PROJECT_NAME}" +export GVM_PATHS_NAME=( + "src" + "pkg" + "bin" +) + +export GRIP_PORT=6430 + +# Vars Dir +export ROOT_DIR +ROOT_DIR=$(pwd) +export RESOURCES_DIR="$ROOT_DIR/resources" +export RESOURCES_DB_DIR="$RESOURCES_DIR/db" +export SOURCE_DIR="${ROOT_DIR}/" +export REQUIREMENTS_DIR="${SOURCE_DIR}/requirements/" diff --git a/script/clean.sh b/script/clean.sh new file mode 100755 index 0000000..4e0db2d --- /dev/null +++ b/script/clean.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +{ + rm -rf -- **/**/*__pycache__ + rm -rf -- **/**/*.pyc + rm -rf -- **/**/*.swp +} >> /dev/null 2>&1 diff --git a/script/grip.sh b/script/grip.sh new file mode 100755 index 0000000..10a1926 --- /dev/null +++ b/script/grip.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +grip --pass "${GITHUB_API_TOKEN}" "${GRIP_PORT}" \ No newline at end of file diff --git a/script/gvm.sh b/script/gvm.sh new file mode 100755 index 0000000..0f07c8b --- /dev/null +++ b/script/gvm.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +# shellcheck source=/dev/null +[ -r "$HOME/.gvm/scripts/gvm" ] && source "$HOME/.gvm/scripts/gvm" + +gvm pkgset list | grep -q "${GVM_NAME}" +response=$? + +if [[ ! "${response}" -eq '0' ]]; then + gvm pkgset create "${GVM_NAME}" +fi + +gvm pkgset use "${GVM_NAME}" + +mkdir -p "${GOPATH}/src" +mkdir -p "${GOPATH}/pkg" +mkdir -p "${GOPATH}/bin" diff --git a/script/install.sh b/script/install.sh new file mode 100755 index 0000000..4fe5650 --- /dev/null +++ b/script/install.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +pip install -r "${REQUIREMENTS_DIR}/dev.txt" diff --git a/script/linguist.sh b/script/linguist.sh new file mode 100755 index 0000000..ad2aca0 --- /dev/null +++ b/script/linguist.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +bundle exec linguist --breakdown diff --git a/script/lintcode.sh b/script/lintcode.sh new file mode 100755 index 0000000..367a86a --- /dev/null +++ b/script/lintcode.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +pre-commit install -f --install-hooks +pre-commit run --all-files diff --git a/script/pyenv.sh b/script/pyenv.sh new file mode 100755 index 0000000..bae9463 --- /dev/null +++ b/script/pyenv.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +# load source files externals +if [ -e "$HOME/.pyenv" ]; then + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" +fi + +cd "${ROOT_DIR}" || exit + +pyenv virtualenv "${PYTHON_VERSION}" "${PYENV_NAME}" >> /dev/null 2>&1 || echo 'Oh Yeah!!' \ No newline at end of file diff --git a/script/setup.sh b/script/setup.sh new file mode 100755 index 0000000..2e12827 --- /dev/null +++ b/script/setup.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" diff --git a/script/sync.sh b/script/sync.sh new file mode 100755 index 0000000..6329259 --- /dev/null +++ b/script/sync.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" diff --git a/script/test.sh b/script/test.sh new file mode 100755 index 0000000..87d383e --- /dev/null +++ b/script/test.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" \ No newline at end of file diff --git a/script/watch.sh b/script/watch.sh new file mode 100755 index 0000000..db69471 --- /dev/null +++ b/script/watch.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +# shellcheck source=/dev/null +[ -r "script/bootstrap.sh" ] && source "script/bootstrap.sh" + +cd "${SOURCE_DIR}" || exit