Insapp architecture
Related repositories: API, web, Android, iOS version.
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!
The api contains a CLI:
docker-compose exec api ./insapp-cli
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 yourEmail@exemple.com
To pull last updates, simply run the pull_changes.sh
script:
chmod +x pull_changes.sh
./pull_changes.sh
Folder ./insapp-db
is bound to /data/db
in db container.
docker-compose exec db mongo -u insapp-admin -p <password>
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.
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
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