Skip to content

Commit

Permalink
Merge pull request #64 from krig-collective/knacka
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
Johannestegner committed Mar 31, 2018
2 parents 7f0f2cc + 97b4da4 commit c639c09
Show file tree
Hide file tree
Showing 83 changed files with 8,670 additions and 3,016 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitignore
docker-compose.yml
Dockerfile
.dockerignore
DOCS.md
README.md
.idea
node_modules
File renamed without changes.
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.gitignore export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitlab-ci.yml export-ignore
.static export-ignore
.travis.yml export-ignore


* text eol=lf

*.png binary
*.jpg binary
*.ico binary
13 changes: 4 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FastShell
# https://HosseinKarami.github.io/fastshell
# @author Hossein Karami

/.idea/
.env
/app/*
!app/.gitkeep

## Node.js
lib-cov
Expand All @@ -18,9 +18,6 @@ results
npm-debug.log
node_modules

## Bower
src/components

## Sass
.sass-cache

Expand All @@ -38,5 +35,3 @@ Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

README 2.md
69 changes: 69 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
variables:
TAG: ${CI_COMMIT_REF_NAME}
GIT_STRATEGY: clone

stages:
- test
- image
- deploy

Docker build:
stage: image
image: docker:latest
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME//\//\-} --no-cache .
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME//\//\-}
after_script:
- docker logout registry.gitlab.com
only:
- /^feature\/.*$/
- master
- knacka

Deploy:staging:
stage: deploy
image: jitesoft/alpine-ssh:latest
variables:
HOST: git.krig.cloud
USER: dokku
REPO: knacka.krig.io
BRANCH: ${CI_COMMIT_REF_NAME}
before_script:
- apk add --no-cache git
- eval $(ssh-agent -s)
- echo "${DEPLOY_KEY}" | ssh-add -
- mkdir -p ~/.ssh
- echo "${DOKKU_IDENTITY}" > ~/.ssh/known_hosts
script:
- if git remote | grep -sw "dokku" 2>>/dev/null; then echo "Remote existed." ; else git remote add dokku ${USER}@${HOST}:${REPO}; fi
- git push dokku HEAD:${BRANCH} --force
only:
- knacka
environment:
name: staging
url: https://knacka.krig.io

Deploy:master:
stage: deploy
image: jitesoft/alpine-ssh:latest
variables:
HOST: git.krig.cloud
USER: dokku
REPO: knacka.krig.io
BRANCH: ${CI_COMMIT_REF_NAME}
before_script:
- apk add --no-cache git
- eval $(ssh-agent -s)
- echo "${DEPLOY_KEY}" | ssh-add -
- mkdir -p ~/.ssh
- echo "${DOKKU_IDENTITY}" > ~/.ssh/known_hosts
script:
- if git remote | grep -sw "dokku" 2>>/dev/null; then echo "Remote existed." ; else git remote add dokku ${USER}@${HOST}:${REPO}; fi
- git push dokku HEAD:${BRANCH} --force
only:
- master
environment:
name: production
url: https://krig.io
26 changes: 0 additions & 26 deletions .jshintrc

This file was deleted.

44 changes: 44 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Contribution guidelines.

## Issues

Feel free to add issues in the github repository issue tracker.

## Code Standard

### JavaScript

This repository uses the `semistandard` js standard. Which is same as `standard` but with semicolons sprinkled on top!
Gulp will run the semistandard check on build, make sure it's not red!

## Git flow

We try to stick as much as possible to the standard git-flow methodology.
No one will be shot if one fails to do it correctly!

If you are unaware of how git-flow works, in short:

### Features

Each feature have to have a issue set. When it does, branch out from the default branch (`knacka`) for each new feature.
Branch names should be formatted as `feature/<issuenumber>-short-description`. When a feature is complete, push to origin and create a pullrequest. If wanted, add `Closes #<issuenumber>` in the PR message.

### Releases

A release gets its own branch and tag.

### Hotfixes

Hotfixes are done against release branches. All hotfixes should have their own branches and be formatted as `hotfix/<issuenumber>-short-description`.
When complete, a pullrequest should be opened to the given release branch.

### Commit messages

Commits should include messages with a description of the changes. You don't have to write an essay, just a line or two.

Example:

> Updated the Contribution guidelines, added info about commit messages.


122 changes: 0 additions & 122 deletions DOCS.md

This file was deleted.

12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM jitesoft/node-yarn:stable as build
ENV NODE_ENV=production
RUN yarn global add gulp-cli
COPY . /app
WORKDIR /app
RUN yarn install && gulp build

FROM jitesoft/lighttpd
ENV PORT=5000
EXPOSE 5000
COPY --from=build /app/app /var/www/html
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ Website for KRIG community.
## Get started

1. Clone or download repo.
2. Make sure your got [Node.js](http://nodejs.org/download), [Sass](http://sass-lang.com/tutorial.html), [Git](http://git-scm.com) and [Gulp](http://Gulpjs.com/) installed on your local machine.
3. Run `npm install` in your project directory.
2. Make sure your got [Node.js](http://nodejs.org/download), [Sass](http://sass-lang.com/tutorial.html), [Git](http://git-scm.com) and latest [Gulp-cli](https://www.npmjs.com/package/gulp-cli) installed globally on your local machine.
3. Run `yarn install` in your project directory.
4. Run `gulp` to fire up browsersync and watching files.

## Info

The application uses the Gulp4 package (which is still in beta) to enable better series and parallel builds.
To run gulp 4, the latest (1.4.0+) gulp-cli package is required to be installed globally or accessed from the `node_modules/.bin` dir.

To list all available gulp tasks, type `gulp --tasks` in the terminal. To start the default task, just run the `gulp` command and let the script build and watch for changes.

The `/app` directory is only intended for files built by gulp.
All code edits are supposed to be made in the `/src` directory.

WebPack is used for JavaScript, the language level is set to 2017, and it will compile the code to ES5 on build.
The JS entrypoint is in the `/src/js/scripts.js` file.
To add a new entrypoint, check the `compile-js` task in the gulpfile.
Empty file added app/.gitkeep
Empty file.
5 changes: 0 additions & 5 deletions app/assets/components/jquery/jquery.min.js

This file was deleted.

Loading

0 comments on commit c639c09

Please sign in to comment.