Sign inSign up

epandurski/cmbarter

By epandurski

•Updated about 8 years ago

Server-side software for managing peer-to-peer trading networks.

Image
3

2.5K

epandurski/cmbarter repository overview

⁠Circular Multilateral Barter

"Circular Multilateral Barter" (CMB) is server-side software for managing peer-to-peer trading networks. CMB is aimed at supplying entrepreneurs with a way to exchange goods and services within a p2p-network, without using money, overcoming the "double coincidence of wants" problem, inherent to traditional barter.

Most importantly, CMB allows traders to issue their own currencies (called "products"), which others can redeem, trade, or make payments with. One thing that distinguishes CMB from other "credit commons" is that all debts in CMB are user-to-user debts. There is no central administrative authority to decide who deserves to be trusted and who does not. Because of this, CMB can scale-up very well, so that local communities can be seamlessly aggregated into larger ones.

Another way of seeing CMB is as a partnership of independent Local Exchange Trading Systems, having a common marketplace for exchanging one LETS-currency for another (via circular trade).

⁠Features

  • Does not suffer the double coincidence of wants problem. The trader you deliver goods to and the trader you obtain what you need from do not need to be the same person, so there is much more flexibility for arranging trades. That is: you supply products to customers who trust you, and you receive products from partners whom you trust.

  • Invulnerable to sudden changes in the value of money. CMB uses money solely as a standard of value for a short period of time (typically a day).

  • Allows users to issue their own currencies (called "products"). Therefore, trading is not limited by the global scarcity of money or any other commodity.

  • Users can make direct payments to each other.

  • Convenient to use on smartphones. Works even on very old phones (WAP 2.0).

⁠Running all services together

Here is a docker-compose.yaml file that you may start with (without changes, it should start a CMB server at https://localhost/⁠ ):

version: '2'

services:
  web:
    image: epandurski/cmbarter:1-web
    depends_on:
      - db
      - tasks
    environment:
      # Set this to the number of worker processes for handling requests --
      # a positive integer generally in the 2-4 * $NUM_CORES range. You may
      # want to vary this a bit to find the best for your particular
      # workload.
      WEB_CONCURRENCY: 1

      # Set this to your site domain name.
      CMBARTER_HOST: 'localhost'

      # Set this to a random, long, secret string. Alternatively, if you do not
      # set it here, the secret key will be obtained from the contents of the
      # file /run/secrets/CMBARTER_SECRET_KEY.
      CMBARTER_SECRET_KEY: 'enter a secret key here'

      # By default, CMB is configured to show reCAPTHCA on sign-up, and after
      # five unsuccessful attempts to log-in. If you have not altered the
      # default behavior, you should obtain your own public/private key pair
      # from www.google.com/recaptcha, and put it here. (Default keys work for
      # "localhost".)
      CMBARTER_RECAPTCHA_PUBLIC_KEY: '6Lc902MUAAAAAJL22lcbpY3fvg3j4LSERDDQYe37'
      CMBARTER_RECAPTCHA_PIVATE_KEY: '6Lc902MUAAAAAN--r4vUr8Vr7MU1PF16D9k2Ds9Q'

      # This should point to a page telling more about the site.
      CMBARTER_ABOUT_US_URL: 'https://sourceforge.net/projects/cmb/'

  db:
    image: epandurski/cmbarter:1-db
    volumes:
      - data-volume:/var/lib/postgresql/data

  tasks:
    image: epandurski/cmbarter:1-tasks
    depends_on:
      - db
    environment:
      # Set this to your site domain name.
      CMBARTER_HOST: 'localhost'

      # Set this to the name and the port of the outgoing SMTP server. If
      # you do not have a mail server, you may temporarily leave all SMTP_*
      # configuration variables as they are -- it will work, but it will not
      # be able to send e-mails.
      SMTP_HOST: 'mail:25'

      # Set this to 'none', 'SSL', or 'STARTTLS'.
      SMTP_ENCRYPTION: 'none'

      # Set this to the username for the SMTP authentication, or leave it
      # empty if authentication is not required by the mail server.
      SMTP_USERNAME: ''

      # Set this to the password for the SMTP authentication, or leave it
      # empty if authentication is not required by the mail server.
      SMTP_PASSWORD: ''

  proxy:
    # This image tries to find an SSL certificate and a private key at
    # /run/secrets/cert.pem and /run/secrets/key.pem.  If they are not
    # found there, it falls back to a self-signed certificate.

    image: epandurski/cmbarter:1-proxy
    depends_on:
      - web
    cap_add:
      - NET_ADMIN
    ports:
      - "80:80"
      - "443:443"
    environment:
      # Set this to your site domain name.
      CMBARTER_HOST: 'localhost'


volumes:
  # This volume will contain the PostgreSQL database.
  data-volume:

Tag summary

Content type

Image

Digest

Size

44.2 MB

Last updated

about 8 years ago

docker pull epandurski/cmbarter:1-proxy