MissionKontrol is an admin panel that allows users to CRUD data in one or more databases. The app has its own database that is used to store configuration and comments. Databases that you connect to are updated directly.
The separate missionkontrol relay rails gem improves write/update/delete validations. We are looking at adding the ability to update via webhook/API.
- CRUD tables w/serverside search
- Drag & Drop views
- Automated task queues
- RBAC permissions system
CRUD tables w/serverside search
Full documentation can be found here: https://www.missionkontrol.io
In order to get your development environment up and running, simply follow these steps.
- Install Docker
- Boot up docker with
make start
- Jump into docker with
make bash
- Install rails dependencies with
bundle install
- Setup database with
bundle exec rails db:setup
- Test it works by running the server
bundle exec rails s
Below is a guide to common development tasks you'll probably need whilst working on this application.
Before running any of these commands, you need to make sure Docker is running with the following:
make start
If Docker is running but it doesn't seem to be working, you can follow the advice below.
make bash
bundle exec rails s
To run all tests, you can do the following:
make bash
bundle exec rspec
If you want to run a particular test:
make bash
bundle exec rspec spec/path/to_my_spec.rb
Creating a migration and running it:
make bash
bundle exec rails g migration CreateProducts name:string
bundle exec rails db:migrate
Recreating the database:
make bash
bundle exec rails db:reset
To setup Docker for the first time use the start command. It's safe to run multiple times.
make start
If you want to stop your containers to save your battery or CPU you can run the following stop command.
make stop
If you want to do a non-destructive restart, just to kick the tires a little, then you can use the restart command.
make restart
When things go wrong or you stop working on this application, you may want to tear down the Docker setup. You can use this command:
make clean
If things have gone wrong and you want to start from scratch, you can restart the whole setup:
make clean
make start
make bash
bundle install
bundle exec rails db:setup
There are several environment variables that can be used to modify the operation of the application and its containers.
-
KUWINDA_DATABASE_HOST
- specifies the address of the database server; -
KUWINDA_DATABASE_PORT
- specifies the database server port (default value:5432
); -
KUWINDA_DATABASE_USER
- specifies the name of the database user; -
KUWINDA_DATABASE_PASSWORD
- specifies the password of the database user; -
KUWINDA_DATABASE_TIMEOUT
- configures the maximum waiting time for the database server to become available (default value:42s
); -
KUWINDA_DATABASE_SETUP
- indicates whether database will be created from scratch (default value:true
); -
PORT
- specifies the port of the application server (default value:3000
); -
WEB_CONCURRENCY
- specifies the number ofworkers
(forked webserver processes) to boot in clustered mode. -
RAILS_MAX_THREADS
- specifies the number ofthreads
each of workers will use under the hood (default value:5
); -
RAILS_ENV
- specifies the applicationenvironment
(default value:development
); -
RAILS_MASTER_KEY
- key used to decrypt encryptedcredentials.yml.enc
file; -
RAILS_SERVE_STATIC_FILES
- allows to offload serving static files to Apache or NGINX web server; -
RAILS_LOG_TO_STDOUT
- enables sending logs of theproduction
environment toSTDOUT
.
NGINX Web Server configuration:
WEB_SERVER_ENABLE
- enables and runs the nginx when the containers is started;WEB_SERVER_USE_HTTPS
- enables HTTPS port on the web server;WEB_SERVER_PORT
- allows to override the default HTTP port -80/tcp
;WEB_SERVER_HTTPS_PORT
- allows to override the default HTTPS port -443/tcp
;WEB_SERVER_STATIC_FILES
- enables serving static files by web server - should be used in combination withRAILS_ENV=production
andRAILS_SERVE_STATIC_FILES=true
.