This repository was archived by the owner on Dec 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Ease startup #2
Closed
themouette
wants to merge
7
commits into
webdriverio-boneyard:1.0
from
themouette:features/easy-startup
Closed
Ease startup #2
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8994efd
Fix gem versions using a Gemfile
45607d6
Add an install script
95145b6
Add a fig configuration to run both mongodb and app locally
3cbad27
Add some npm scripts
c69bedf
Fix runing in docker container should expose debugger
f480278
Add installation documentation
a5b4580
Add container should have compass installed
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:0.10 | ||
|
||
RUN apt-get -y update && apt-get install -y ruby rubygems | ||
|
||
ADD ./Gemfile . | ||
|
||
RUN gem install bundler | ||
RUN bundle install | ||
|
||
RUN npm install -g grunt | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'sass', "3.2.9" | ||
gem 'sass-globbing', ">= 1.1.0" | ||
gem 'compass', "0.12.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
chunky_png (1.3.3) | ||
compass (0.12.2) | ||
chunky_png (~> 1.2) | ||
fssm (>= 0.2.7) | ||
sass (~> 3.1) | ||
fssm (0.2.10) | ||
sass (3.2.9) | ||
sass-globbing (1.1.1) | ||
sass (>= 3.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
compass (= 0.12.2) | ||
sass (= 3.2.9) | ||
sass-globbing (>= 1.1.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is the project root. | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" | ||
|
||
# Log a message. | ||
function log { | ||
echo -e " \033[32m*\033[0m ${1}" | ||
} | ||
# write an error message. | ||
function error { | ||
echo -e "\033[31m${1}\033[0m" | ||
} | ||
|
||
|
||
# | ||
# Utilities to check core dependencies | ||
# | ||
function check_npm_installed { | ||
if [ -z "$(which npm)" ] ; | ||
then | ||
error "Node and npm are required" | ||
exit 1; | ||
fi | ||
} | ||
|
||
function check_bundler_installed { | ||
if [ -z "$(which bundle)" ] ; | ||
then | ||
if [ -z "$(which gem)" ] ; | ||
then | ||
error "Ruby and gem are required (install with ruby executable in your path)" | ||
exit 1; | ||
fi | ||
|
||
log "Install bundler." | ||
gem install bundler | ||
fi | ||
} | ||
|
||
function check_deps { | ||
check_npm_installed | ||
# check_bundler_installed | ||
} | ||
|
||
# | ||
# utilities to install packages. | ||
# | ||
|
||
function install_npm { | ||
if [ -z "$(which grunt)" ] ; | ||
then | ||
log "Install grunt cli" | ||
npm install grunt-cli | ||
fi | ||
log "Install npm dependencies" | ||
npm install | ||
} | ||
|
||
function install_bower { | ||
log "Install bower dependencies" | ||
$DIR/node_modules/.bin/bower install | ||
} | ||
|
||
function install_submodule { | ||
log "Install git submodules" | ||
git submodule update --init | ||
} | ||
|
||
function install_gem { | ||
log "Install gem files"; | ||
bundle install | ||
} | ||
|
||
function install { | ||
check_deps | ||
install_npm | ||
install_bower | ||
install_gem | ||
#install_submodule | ||
} | ||
|
||
install | ||
|
||
if [ $? -eq 0 ] ; then | ||
log "Everything went fine." | ||
else | ||
error "An error append, please check command output for more information." | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Webdrivercss Adminpanel Installation | ||
==================================== | ||
|
||
## Local Machine | ||
|
||
You will need the following installed on system: | ||
|
||
* nodejs and npm | ||
* ruby | ||
|
||
``` | ||
# Fetch code | ||
git clone https://github.com/webdriverio/webdrivercss-adminpanel.git | ||
cd webdrivercss-adminpanel | ||
|
||
# Install dependencies | ||
./bin/install | ||
|
||
# install grunt-cli | ||
npm install -g grunt-cli | ||
|
||
# Build and serve code | ||
grunt serve:dev | ||
``` | ||
|
||
## Using Docker and Fig | ||
|
||
You will need the following installed on system: | ||
|
||
* [docker](http://docker.com) | ||
* [fig](http://fig.sh) | ||
|
||
``` | ||
# Fetch code | ||
git clone https://github.com/webdriverio/webdrivercss-adminpanel.git | ||
cd webdrivercss-adminpanel | ||
|
||
# Install dependencies | ||
fig run npm install | ||
|
||
# Up | ||
fig up frontend | ||
``` | ||
|
||
More information about what is happening in `fig.yml` file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This is the main entry point. | ||
# | ||
# Service is exposed on port 9000. | ||
# | ||
# Each time container is restarted, generated files are cleaned and recreated. | ||
# | ||
# fig up frontend | ||
frontend: | ||
build: . | ||
environment: | ||
- PORT=9000 | ||
ports: | ||
- "9000:9000" | ||
- "8080:8080" | ||
links: | ||
- db | ||
volumes: | ||
- .:/usr/src/adminpanel | ||
working_dir: /usr/src/adminpanel | ||
command: run fig | ||
entrypoint: npm | ||
|
||
# Run npm commands from this container | ||
# | ||
# fig run npm install | ||
# fig run npm run dev | ||
npm: | ||
build: . | ||
volumes: | ||
- .:/usr/src/adminpanel | ||
working_dir: /usr/src/adminpanel | ||
command: install | ||
entrypoint: npm | ||
|
||
|
||
# Add a mongo database. | ||
db: | ||
image: mongo:2.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this isn't required anymore we can delete it