diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2bfe894c9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "0.10" - - "0.12" - - "4.0" - - "4.1" - - "4.2" - -env: - - CXX="g++-4.8" - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 - - gcc-4.8 diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 6a1876068..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,206 +0,0 @@ -## 0.4.5 (2015-12-22) - -Fixes - -* Issues with NODE_PATH -* Fr language update - -## 0.4.4 (2015-10-26) - -Enhancements - -* Support for Node v4 - -## 0.4.3 (2015-10-09) - -Fixes - -* Issues with passport dependencies -* XMPP message ID - -Enhancements - -* New client styling -* Russian and Polish languages - -## 0.4.2 (2015-07-14) - -Fixes - -* Update dependencies - -Enhancements - -* Show version in the app -* Various accessibility additions - -## 0.4.1 (2015-07-08) - -Fixes - -* [Conversations](https://github.com/siacs/Conversations) double messaging -* Transcripts were not printable - -Enhancements - -* Giphy can be toggled in settings -* New translations: nl, de, pt, fr, jp, etc -* Various Docker improvements (config volume, etc) -* Better message time groupings - -## 0.4.0 (2015-06-04) - -Enhancements - -* Private and password-protected rooms -* Private 1-to-1 chat between XMPP users -* Giphy image search -* @all mentions are highlighted for everyone -* Basic server-side i18n support - -## 0.3.13 (2015-05-29) - -Fixes - -* Multiple layout bugs due to overflowing content in Firefox -* Layout issue introduced by Chrome 43 - -## 0.3.12 (2015-05-19) - -Fixes - -* Multiple layout bugs due to overflowing content in Firefox -* Layout issue introduced by Chrome 43 - -## 0.3.11 (2015-05-19) - -Fixes - -* Env variable loading -* Various notification adjustments - -Enhancements - -* Usernames may now contain underscores and dashes -* Unicode character support for links in messages -* Unread message counts in the favicon -* Newlines with `shift+enter` - -## 0.3.10 (2015-04-14) - -Fixes - -* Fixed Hyperlink parsing -* Fixed issue whereby a deleted user's messages would not display - -## 0.3.9 (2015-04-06) - -Deprecated - -* `xmpp.host` configuration setting - use `xmpp.domain` instead - -Enhancements - -* Thumbnails are improved -* Support multiple XMPP domains being used between clients -* XMPP can be configured to authenticate using full JID - instead of only node -* Added process title - -Fixes - -* Fixed "express deprecated req.host: Use req.hostname instead" -* Fixed File Uploads "Post" checkbox -* Fixed issues with desktop notifications -* Fixed XMPP MUC nickname not being reflected to user - -## 0.3.8 (2015-03-02) - -Fixes - -* Fixed error when passing an invalid room ID to transcript page -* Fixed problem where client would join a room twice - -## 0.3.7 (2015-03-01) - -Fixes - -* Fixed MongoDB version check - -## 0.3.6 (2015-02-28) - -Enhancements - -* Transcripts now support text search (#39) -* Plugins support environment variables (#254) - -Fixes - -* Long room names are clipped in the UI (#221) -* User details are updated in message list (#172) -* XMPP status changes no longer re-trigger room join event (#322) -* Fixed error when rooms in local storage are no longer available - -## 0.3.5 (2015-02-26) - -Fixes - -* Asset pipeline outputs relative paths (#208) -* Temporary upload files are cleaned up -* Fixed UI rendering performance issues -* Updated login registration form layout -* Fixed room archive bug -* XMPP fixes (chat history and client compatibility) - -## 0.3.4 (2015-02-19) - -Enhancements - -* OpenShift compatibility (#199) -* Added ability to serve robots.txt file - -Fixes - -* Fixed parsing of environment variables -* Disable autocomplete on password fields -* Upload modal only shows rooms you have joined - -## 0.3.3 (2015-02-14) - -Enhancements - -* XMPP users can create rooms (if enabled by configuration) -* Extra methods can be defined on XMPP message processors -* Support periods in usernames -* [Amazon S3](https://github.com/sdelements/lets-chat-s3) support has been extracted into a separate plugin - -Fixes - -* Auth token men option when XMPP was disabled (#235) -* Improved transcript date range picker -* Chat history didn't load when rejoining room (#242) -* Error messages not shown when creating a room (#229) - -## 0.3.2 (2015-02-12) - -Enhancements - -* Extracted [Kerberos](https://github.com/sdelements/lets-chat-kerberos) and [LDAP](https://github.com/sdelements/lets-chat-ldap) authentication into separate plugins -* Added fig.yml - -Fixes - -* Fixed error on messages andpoint when room parameter not specified (#211) -* Fixed undefined error (#210) -* XMPP root now advertises itself as a server, not conference (#214) - -## 0.3.1 (2015-02-10) - -Enhancements - -* Now using an [assets pipeline](https://github.com/adunkman/connect-assets) - -Fixes - -* Fixes related to file upload functionality - -## 0.3.0 (2015-02-06) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 060311330..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,110 +0,0 @@ -# Support / Issues - -Please [open an issue](https://github.com/sdelements/lets-chat/issues/new) for support and questions. - - -# Contributing to Let's Chat - -Looking to contribute something to Let's Chat? **Here's how you can help.** - -Please take a moment to review this document in order to make the contribution -process easy and effective for everyone involved. - -Following these guidelines helps to communicate that you respect the time of -the developers managing and developing this open source project. In return, -they should reciprocate that respect in addressing your issue or assessing -patches and features. - - -## Using the issue tracker - -Having trouble installing Let's Chat? Search for similar issues or post your new problem on the [mailing list][mailing-list]. - -The [issue tracker][tracker] is the preferred channel for [bug reports](#bug-reports), -[features requests](#feature-requests) and [submitting pull requests](#pull-requests), -but please respect the following restrictions: - - -* Please provide as much details about the problem you are encountering (platform, version on node/npm/mongo, etc) - -* Please **do not** derail or troll issues. Keep the discussion on topic and - respect the opinions of others. - - -## Issues and labels - -Our bug tracker utilizes several labels to help organize and identify issues. -They do not signal any commitment from us to deliver. Here's what they -represent and how we use them: - -#### Labels - -- `bug` - Bugs that are reported to us or found by us. -- `feature` - Issues asking for a new feature to be added, or an existing one - to be extended or modified. - - -- `duplicate` - Issues that duplicate an already existing issue. -- `invalid` - Issues that are no longer valid. -- `wontfix` - Issues that are no longer valid. - - -- `xmpp` - Issues that are related to XMPP functionality. - -For a complete look at our labels, see the [project labels page][labels]. - -#### Milestones - -- `backlog` - Issues that are we are not committing to yet, but may be nice to - have in the future. - - -## Bug reports - -A bug is a _demonstrable problem_ that is caused by the code in the repository. -Good bug reports are extremely helpful, so thanks! - -Guidelines for bug reports: - -0. **Search both GitHub issue and the mailing list**. - -2. **Check if the issue has been fixed** — try to reproduce it using the - latest `master` or development branch in the repository. - - -A good bug report shouldn't leave others needing to chase you up for more -information. Please try to be as detailed as possible in your report. What is -your environment? What steps will reproduce the issue? What browser(s) and OS -experience the problem? What -would you expect to be the outcome? All these details will help people to fix -any potential bugs. - - -## Feature requests - -Feature requests are welcome. But take a moment to find out whether your idea -fits with the scope and aims of the project. It's up to *you* to make a strong -case to convince the project's developers of the merits of this feature. Please -provide as much detail and context as possible. - - -## Pull requests - -Good pull requests—patches, improvements, new features—are a fantastic -help. They should remain focused in scope and avoid containing unrelated -commits. - -**Please ask first** before embarking on any significant pull request (e.g. -implementing features, refactoring code, porting to a different language), -otherwise you risk spending a lot of time working on something that the -project's developers might not want to merge into the project. - - -## License - -By contributing your code, you agree to license your contribution under the -[MIT License](LICENSE). - - -[labels]: https://github.com/sdelements/lets-chat/labels -[tracker]: https://github.com/sdelements/lets-chat/issues diff --git a/Dockerfile b/Dockerfile index 19764808e..d632a9067 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app/ -RUN npm install +RUN npm install --silent COPY . /usr/src/app CMD [ "npm", "start" ] diff --git a/Dockerfile.latest b/Dockerfile.latest deleted file mode 100644 index 44a681c47..000000000 --- a/Dockerfile.latest +++ /dev/null @@ -1,11 +0,0 @@ -# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/) -FROM node:latest - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -COPY package.json /usr/src/app/ -RUN npm install --silent -COPY . /usr/src/app - -CMD [ "npm", "start" ] diff --git a/Dockerfile_prod b/Dockerfile_prod deleted file mode 100644 index 49e3ae6a7..000000000 --- a/Dockerfile_prod +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:0.10-slim - -COPY ./package.json /src/package.json -RUN cd /src && npm install -COPY ./ /src - -WORKDIR /src -#ENV DEBUG=* - - -CMD ["npm", "start"] - diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 272eccfb9..000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,23 +0,0 @@ -// -// Gruntfile -// - -'use strict'; - -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - bower: { - install: { - options: { - install: true, - cleanTargetDir: true, - verbose: true, - targetDir: 'media/js/vendor', - layout: 'byComponent' - } - } - } - }); - grunt.loadNpmTasks('grunt-bower-task'); -}; diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7fc104ac8..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012-2015 Houssam Haidar - -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. diff --git a/Procfile b/Procfile deleted file mode 100644 index 063b78f46..000000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm start diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md deleted file mode 100644 index 0f376739f..000000000 --- a/TROUBLESHOOTING.md +++ /dev/null @@ -1,11 +0,0 @@ -# Common Issues - -We'll be improving this document soon. - -#### What version of Node.JS is required? - -Let's Chat requires Node.JS version ```0.10.x``` or ```0.12.x```. You will have a bad time if you try to use a different version. - -#### Do I need MongoDB running? - -Yes. Please refer to [MongoDB's documentation](http://docs.mongodb.org/manual/). diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 561c01d00..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,44 +0,0 @@ -# Lets Chat Vagrant file - -# Set LCB_BRANCH to pick what git checkout to use when spinning up the -# application. For example: -# -# $ LCB_BRANCH="feature-branch vagrant up. -# -LCB_BRANCH = ENV['LCB_BRANCH'] || 'master' - - -# Script that we run to bootstrap the system to run Let's Chat -LCB_SCRIPT = < LCB_SCRIPT, :privileged => false - end - - config.vm.provider "virtualbox" do |v| - v.gui = true - v.name = "Lets Chat" - v.memory = 1024 - end -end diff --git a/app.json b/app.json deleted file mode 100644 index c7d4dda99..000000000 --- a/app.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "Let's Chat", - "description": "Self-hosted chat app for small teams", - "repository": "https://github.com/sdelements/lets-chat", - "logo": "http://i.imgur.com/eXTLHNN.png", - "keywords": [ - "lets", - "chat", - "xmpp" - ], - "addons": [ - "mongolab" - ], - "env": { - "NODE_ENV": { - "description": "Configures Express for production", - "value": "production" - }, - "LCB_SECRETS_COOKIE": { - "description": "Session cookies are signed with this secret to prevent tampering", - "generator": "secret" - } - } -} diff --git a/codefresh-env.yml b/codefresh-env.yml new file mode 100644 index 000000000..3beeffb5e --- /dev/null +++ b/codefresh-env.yml @@ -0,0 +1,54 @@ +version: '1.0' +steps: + + build_step: + title: Build + type: build + dockerfile: Dockerfile + image_name: itaicodefresh/demochat + tag: '${{CF_BRANCH}}' + + unit_test: + type: composition + working_directory: '${{main_clone}}' + composition: + version: '2' + services: + mongo: + image: 'mongo:latest' + ports: + - 27017 + composition_candidates: + test: + image: '${{build_step}}' + command: npm test + + push_to_registry: + title: Push To Registry + type: push + candidate: ${{build_step}} + tag: ${{CF_BRANCH}} + when: + branch: + only: + - master + + launch_dev_env: + type: launch-composition + composition: './docker-compose.yml' + environment_name: 'dev_env' + + deploy_to_kubernetes: + image: codefresh/cf-deploy-kubernetes + tag: latest + working_directory: ${{main_clone}} + commands: + - /cf-deploy-kubernetes ./deploy/kube-app.yml + environment: + - KUBERNETES_USER=${{KUBERNETES_USER}} + - KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}} + - KUBERNETES_SERVER=${{KUBERNETES_SERVER}} + when: + branch: + only: + - master diff --git a/codefresh.yml b/codefresh.yml index a295b40a3..c04463a32 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -1,67 +1,20 @@ version: '1.0' steps: + build_step: title: Build type: build dockerfile: Dockerfile - image_name: containers101/demochat + image_name: itaicodefresh/demochat tag: '${{CF_BRANCH}}' -# unit_tests: -# title: Unit Tests -# image: ${{build_step}} -# fail_fast: false -# working-directory : /usr/src/app -# commands: -# - npm test - unit_test: - type: composition - working_directory: '${{main_clone}}' - composition: - version: '2' - services: - mongo: - image: 'mongo:latest' - ports: - - 27017 - composition_candidates: - test: - image: '${{build_step}}' - command: npm test push_to_registry: title: Push To Registry type: push candidate: ${{build_step}} tag: ${{CF_BRANCH}} - - deploy_to_ecs: - title: Deploy Container to ECS - image: codefresh/cf-deploy-ecs - commands: - - >- - cfecs-update --image-name containers101/demochat --image-tag - ${{CF_BRANCH}} eu-west-1 demochat-production demochat-service - environment: - - 'AWS_ACCESS_KEY_ID=${{AWS_ACCESS_KEY_ID}}' - - 'AWS_SECRET_ACCESS_KEY=${{AWS_SECRET_ACCESS_KEY}}' - when: - condition: - all: - deploy_to_ecs: '"${{DEPLOY_ECS}}" == "true"' - - deploy_to_kubernetes: - image: codefresh/cf-deploy-kubernetes - tag: latest - working_directory: ${{main_clone}} - commands: - - /cf-deploy-kubernetes deployment.yml - environment: - - KUBERNETES_USER=${{KUBERNETES_USER}} - - KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}} - - KUBERNETES_SERVER=${{KUBERNETES_SERVER}} - - DOCKER_IMAGE_TAG=${{CF_BRANCH}} when: - condition: - all: - deploy_to_kubernetes: '"${{DEPLOY_KUBERNETES}}" == "true"' + branch: + only: + - master diff --git a/deploy/kube-app.yml b/deploy/kube-app.yml index 910d371be..4f2ccef4b 100644 --- a/deploy/kube-app.yml +++ b/deploy/kube-app.yml @@ -10,15 +10,20 @@ spec: template: metadata: annotations: - forceRedeployUniqId: "N/A" + forceRedeployUniqId: "{{CF_REVISION}}" labels: service: app spec: containers: - - image: containers101/demochat:master + - image: itaicodefresh/demochat:master name: app imagePullPolicy: Always ports: - containerPort: 5000 protocol: TCP + readinessProbe: + httpGet: + path: /login + port: 5000 + diff --git a/deploy/kube-mongo.yml b/deploy/kube-mongo.yml index c3e589cd9..36d973a7b 100644 --- a/deploy/kube-mongo.yml +++ b/deploy/kube-mongo.yml @@ -1,6 +1,6 @@ --- kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 +apiVersion: storage.k8s.io/v1 metadata: name: gce-disk provisioner: kubernetes.io/gce-pd diff --git a/deploy/kube-ingress.yml b/deploy/kube-service.yml similarity index 54% rename from deploy/kube-ingress.yml rename to deploy/kube-service.yml index 08c09b016..ed00ee5a9 100644 --- a/deploy/kube-ingress.yml +++ b/deploy/kube-service.yml @@ -6,7 +6,7 @@ metadata: app: app name: app spec: - type: NodePort + type: LoadBalancer ports: - name: "http" port: 80 @@ -14,12 +14,3 @@ spec: targetPort: 5000 selector: service: app ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: demochat-ingress -spec: - backend: - serviceName: app - servicePort: 80 diff --git a/deployment.yml b/deployment.yml deleted file mode 100644 index dde1e6901..000000000 --- a/deployment.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: app - labels: - service: app -spec: - replicas: 2 - template: - metadata: - annotations: - forceRedeployUniqId: "{{CF_REVISION}}" - labels: - service: app - spec: - containers: - - image: containers101/demochat:{{CF_BRANCH}} - name: app - imagePullPolicy: Always - ports: - - containerPort: 5000 - protocol: TCP - diff --git a/docker-compose.yml b/docker-compose.yml index c0d0dc9fb..3a142f3d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,7 @@ -#this is an example of a self-hosted chat app. -#the composition uses just mongo as a database and an image that was built from a demo application https://github.com/containers101/demochat - version: '2' services: demochat: - build: . + image: 'itaicodefresh/demochat:master' ports: - 5000 mongo: diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index d441313f8..000000000 --- a/gulpfile.js +++ /dev/null @@ -1,32 +0,0 @@ -var gulp = require('gulp'); -var istanbul = require('gulp-istanbul'); -// We'll use mocha in this example, but any test framework will work -var mocha = require('gulp-mocha'); -var debug = require('gulp-debug'); - -gulp.task('pre-test', function () { - return gulp.src(['app/**/*.js','!app/tests/**/*.spec.js']) - // Covering files - .pipe(istanbul()) - // Force `require` to return covered files - .pipe(istanbul.hookRequire()); -}); - -gulp.task('test', ['pre-test'], function () { - console.log('test task') - return gulp.src(['app/tests/*.js']) - .pipe(debug({title: 'unicorn:'})) - .pipe(mocha({timeout:10000})) - // Creating the reports after tests ran - .pipe(istanbul.writeReports()) - // Enforce a coverage of at least 90% - //.pipe(istanbul.enforceThresholds({ thresholds: { global: 20} })); -}); - -gulp.task('integration', function () { - console.log('running integration tests .....') - console.log('done'); - return; - // Enforce a coverage of at least 90% - //.pipe(istanbul.enforceThresholds({ thresholds: { global: 20} })); -}); diff --git a/screenshot.png b/screenshot.png deleted file mode 100644 index ed45cfca1..000000000 Binary files a/screenshot.png and /dev/null differ diff --git a/settings.yml.sample b/settings.yml.sample deleted file mode 100644 index 5d11d3255..000000000 --- a/settings.yml.sample +++ /dev/null @@ -1,40 +0,0 @@ -# -# Let's Chat Settings -# -# See defaults.yml for all available options -# - -env: production # development / production - -http: - enable: true - host: 'localhost' - port: 5000 - -https: - enable: false - port: 5001 - key: key.pem - cert: certificate.pem - -files: - enable: true - provider: local - local: - dir: uploads - -xmpp: - enable: false - port: 5222 - domain: example.com - -database: - uri: mongodb://localhost/letschat - -secrets: - cookie: secretsauce - -auth: - providers: [local] - local: - enableRegistration: true diff --git a/templates/login.html b/templates/login.html index 38e76950d..dd2cb3e3f 100644 --- a/templates/login.html +++ b/templates/login.html @@ -14,7 +14,7 @@ <% block body %>
-

Let's Chat

+

Let's Chat Today!