All Projects → sharetribe → harmony

sharetribe / harmony

Licence: Apache-2.0 License
Availability management backend and API for Sharetribe marketplaces

Programming Languages

clojure
4091 projects
shell
77523 projects
PLpgSQL
1095 projects
TSQL
950 projects
Dockerfile
14818 projects
PLSQL
303 projects

Projects that are alternatives of or similar to harmony

networkdays
Networkdays functions ... including `networkdays` excel like function with no dependencies (no NumPy)
Stars: ✭ 22 (+22.22%)
Mutual labels:  calendar
bhitte-patro
Google Calendar for Nepali Date
Stars: ✭ 25 (+38.89%)
Mutual labels:  calendar
astro
自用天文算法,公历农历转换、八大行星位置、日出日落月出月落时间、节气物候时间等
Stars: ✭ 33 (+83.33%)
Mutual labels:  calendar
fpplatform
FPPlatform is the fixed-price marketplace software that is capable to launch fiverr clones, microworkers, etc. Ideal for micro jobs, tasks, errands, etc
Stars: ✭ 28 (+55.56%)
Mutual labels:  marketplace
fiscalyear
📆 Utilities for managing the fiscal calendar
Stars: ✭ 33 (+83.33%)
Mutual labels:  calendar
instl
💻 A crossplatform installer for GitHub projects that just works!
Stars: ✭ 45 (+150%)
Mutual labels:  service
Driver.NET
Lightweight and flexible library to load and communicate with kernel drivers on Windows.
Stars: ✭ 59 (+227.78%)
Mutual labels:  service
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (+27.78%)
Mutual labels:  calendar
holidata
Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
Stars: ✭ 27 (+50%)
Mutual labels:  calendar
Ecoleta
♻️ Aplicação web para coleta de resíduos de forma eficiente.
Stars: ✭ 19 (+5.56%)
Mutual labels:  marketplace
SSTMCSPGAAS
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service
Stars: ✭ 23 (+27.78%)
Mutual labels:  service
vue-calendar
基于vue和moment开发的时间组件
Stars: ✭ 25 (+38.89%)
Mutual labels:  calendar
hls-live-thumbnails
A service which will generate thumbnails from a live HLS stream.
Stars: ✭ 49 (+172.22%)
Mutual labels:  service
isoweek
Go package for calculating a start date and time of ISO 8601 week. (golang)
Stars: ✭ 32 (+77.78%)
Mutual labels:  calendar
ios-permissions-service
An easy way to do permissions requests & handling automatically.
Stars: ✭ 25 (+38.89%)
Mutual labels:  calendar
node-google-calendar
Simple node module that supports Google Calendar API
Stars: ✭ 76 (+322.22%)
Mutual labels:  calendar
Klendario
A Swift wrapper over the EventKit framework
Stars: ✭ 44 (+144.44%)
Mutual labels:  calendar
httpbun
A simple HTTP server with responses tuned to be useful in testing HTTP clients. Heavily inspired by httpbin, but doesn't intend to be a perfect clone.
Stars: ✭ 14 (-22.22%)
Mutual labels:  service
components
Easily develop emails with email-ready components.
Stars: ✭ 18 (+0%)
Mutual labels:  calendar
android-textoverlay
Provides a simple service that allows to display arbitrary text as a system-window overlay.
Stars: ✭ 20 (+11.11%)
Mutual labels:  service

Harmony

CircleCI

Harmony is DEPRECATED. Sharetribe Go from v10.0.0 implements availability management natively.

Availability management backend and API for Sharetribe marketplaces.

For more information about Sharetribe marketplaces and the core marketplace functionalities, see the main Sharetribe repository.

Would you like to set up your marketplace in one minute without touching code? Head to Sharetribe.com.

Contents

Installation

Requirements

Starting a dockerized environment on localhost

This instruction will describe how to set up a local Harmony API on localhost on OS X. This is intended for doing development work for other services that will rely on and integrate to the Harmony API.

  1. Install docker and docker-compose

Use latest Docker for Mac: https://docs.docker.com/engine/installation/mac/

  1. Clone this repository and checkout the latest version
git clone git://github.com/sharetribe/harmony.git
cd harmony
git checkout latest
  1. Create database

First, start up just the database service. In the project root:

docker-compose up db

Next, create an empty database and run migrations:

echo "CREATE DATABASE IF NOT EXISTS harmony_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | mysql -u root --password=harmony-root -h 127.0.0.1 --port 13306

Then, run migrations:

DB_PORT=13306 lein migrate migrate

(Please note that using a bare password in command line command is insecure. Consider changing the default password.)

  1. Start the services

After the database is set up you can now start the API service:

docker-compose up api

Congratulations! The Harmony API Swagger UI is available at http://localhost:8085/apidoc/index.html.

Next time, when the database has been setup you can just run docker-compose up to start both services in one go.

docker-compose up
  1. Exiting

To stop the service, use either Ctrl+C or docker-compose down

Rebuild new code

  1. Exit the running container.
docker-compose down
  1. Pull the newest code and checkout the latest version
git pull
git checkout latest
  1. Rebuild and restart the service
docker-compose build
docker-compose up
  1. Run migrations
DB_PORT=13306 lein migrate migrate

For production use we recommend you to upgrade only when new version is released and not to follow the master branch.

Cleaning old docker containers:

In case the old containers are conflicting somehow with new ones or there is a need to remove old exited containers:

docker-compose rm -v

Changelog

See CHANGELOG.md for detailed list of changes between releases.

Development

When developing Harmony it often easier to run the service outside Docker. In this case, you can still use Docker to run the database. In the development configuration everything is already setup to connect to the exposed port of 13306 using the correct root user password. Just run docker-compose up db, navigate to user-namespace in your favourite REPL client and run (reset).

Database clean up

The database service data volume is mounted in the host OS to ~/.sharetribe/harmony-mysql-data/. This means that the database contents are persisted even across removing and rebuilding the MySQL db container. To completely clean up your development database just delete the aforementioned directory in your home directory:

rm -r  ~/.sharetribe/harmony-mysql-data/

Architecture and coding conventions

Check the conventions for code style and architure: conventions and structure.

Testing

Integrations tests (test/harmony/integration/) run against a live MySQL database and a live web server. By default, the web server is setup to run at localhost:8086. It assumes this port is available for binding.

The default configuration also assumes a MySQL server running at 127.0.0.1:13306 (the setup provided in docker-compose configuration). To run the integration tests locally you need to have the docker container for db running. By default, the tests use harmony_test_db database. The contents of this DB are refreshed after each test using the Migratus migrations (resources/migrations/).

Using in production

For production use, we recommend using Convox and a proper production-ready database, such as Amazon RDS. The Harmony Docker container is optimized for development use.

Before going to production, you need to change secret keys and probably some other configurations, e.g. database server, database username and password and authentication tokens. See ./resources/conf/harmony-api.edn for more information about all the possible configurations.

Deploying

  1. Make sure you're using the right Convox rack:
convox rack

If you need to change the rack, you can first list available racks:

convox racks

...and then switch the rack

convox switch <rack name>
  1. Deploy:

To list all available apps:

convox apps

Deploy:

convox deploy -f docker-compose.harmony-api.yml -a <app name> --wait
  1. Run migrations (if needed):
convox run api lein migrate migrate -a <app name>

Release

See RELEASE.md for information about how to make a new release.

License

Copyright 2017 Sharetribe Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].