name: couchdb
version: 2.0
summary: Document based database
description: CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents and query your indexes with your web browser, via HTTP. Index, combine, and transform your documents with JavaScript. 
confinement: strict
grade: devel

apps:
    couchdb:
        daemon: simple
        command: env 'ERL_FLAGS="-couch_ini ${SNAP_DATA}/default.ini ${SNAP_DATA}/local.ini"' ${SNAP}/bin/couchdb
        plugs: [network-bind]
    run:
        command: env 'ERL_FLAGS="-couch_ini ${SNAP_DATA}/default.ini ${SNAP_DATA}/local.ini"' ${SNAP}/bin/couchdb
        plugs: [network-bind]
parts:
    couchdb: 
        plugin: dump
        source: ./couchdb
        stage-packages:
            - erlang-base-hipe
            - erlang-crypto
            - erlang-eunit
            - erlang-inets
            - erlang-os-mon
            - erlang-public-key
            - erlang-ssl
            - erlang-syntax-tools
            - erlang-tools
            - erlang-xmerl
            - libc6
            - libcurl3
            - libgcc1
            - libicu55
            - libmozjs185-1.0
            - libstdc++6
        

