Code Monkey home page Code Monkey logo

insapp-server's Introduction

insapp-server

Insapp architecture

Related repositories: API, web, Android, iOS version.

Server Setup

This currently doesn't work on Windows because the Mongo image can't read bind mounts from NTFS volumes. This could probably be fixed by using volumes.

Clone this repository and its submodules:

git clone --recursive https://github.com/thomas-bouvier/insapp-server.git

Customize the server by running the install.sh script:

chmod +x install.sh
./install.sh

You can now build and run the Docker instance with:

docker-compose build
docker-compose up -d

You're all set!

CLI

The api contains a CLI:

docker-compose exec api ./insapp-cli

Create your first association

To create your first association (a master association) that can create other associations from the web interface, use:

docker-compose exec api ./insapp-cli association create --name MyFirstAssociation --email [email protected]

Pull updates

To pull last updates, simply run the pull_changes.sh script:

chmod +x pull_changes.sh
./pull_changes.sh

Database

Folder ./insapp-db is bound to /data/db in db container.

docker-compose exec db mongo -u insapp-admin -p <password>

Database Dump

To create a binary export of the MongoDB database, use the following command:

docker-compose exec db mongodump -u insapp-admin -p <password> --authenticationDatabase admin --out /data/db/backups/`date +%Y-%m-%d` --db insapp

You can configure automatic backups to Dropbox by running the enable_backups.sh script. You should edit it beforehand to configure the name of the Docker instance running MongoDB.

Database Restoration

Place a dump in ./insapp-db/current-backup/, then run:

docker-compose exec db mongorestore -u insapp-admin -p <password> -d insapp --authenticationDatabase admin /data/db/current-backup/insapp

Manual configuration

If you want to manually customize the server, you should edit the following configuration files:

  • docker-compose.yml
  • traefik.toml
  • insapp-go/Dockerfile
  • insapp-go/config.json
  • insapp-web/app/src/js/config/app.config.js

insapp-server's People

Contributors

pitougames avatar thomas-bouvier avatar

Watchers

 avatar

Forkers

antoinepegne

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.