Docktor is a platform for administrating and deploying SaaS services based on Docker.
You can simply install docker-compose
and run this command:
docker-compose up
Docker image available here https://hub.docker.com/r/thecampagnards/docktor/. Run a mongo on localhost, then run the service with this command:
docker run -p 8080:8080 -v /data/docktor/assets:/docktor/assets thecampagnards/docktor
You can define some env vars, check back section:
- MONGO_URL: mongodb url (default localhost)
- JWT_SECRET: the jwt signed key (default secret)
- PRODUCTION: boolean check if everything is correct for prod (default false)
- LOG_LEVEL: the log level (default debug)
- DEFAULT_ADMIN_ACCOUNT: the default admin username (default root)
- DEFAULT_ADMIN_PASSWORD: the default admin password (default root)
Docktor is a Go/React(TS) app and use libcompose and docker-api. This project use dependabot to keep dependencies up-to-date.
Docktor needs a mongo as DB. To run a mongo use this command:
docker run -v /data:/data/db --net host --rm mongo
Go version used 1.14.
Create file conf
, adds the flag and its value separates from a space to change its default value.
Usage of server:
-config string
Path to config file (default "conf")
-cron-refresh string
Text param of cron functions to define refresh time (default "@every 30m")
-default-admin-account string
The username of a default administrator account (default "root")
-default-admin-password string
The password of a default administrator account (default "root")
-jwt-secret string
The secret used to sign JWT tokens (default "secret")
-ldap-attr-email string
The LDAP attribute corresponding to the email address of an account
-ldap-attr-firstname string
The LDAP attribute corresponding to the first name of an account
-ldap-attr-lastname string
The LDAP attribute corresponding to the last name of an account
-ldap-attr-username string
The LDAP attribute corresponding to the username of an account
-ldap-base-dn string
The base DN where to search for users
-ldap-bind-dn string
The DN of a LDAP user able to perform queries
-ldap-bind-password string
The password associated to the ldap-bind-dn user
-ldap-host string
The host of the LDAP to connect to
-ldap-port int
The port of the LDAP to connect to (default 389)
-ldap-search-filter string
The search filter
-ldap-secure
The LDAP needs TLS connection
-log-level string
The log level to use (debug, info, warn, error, fatal, panic) (default "debug")
-mongo-url string
The mongo db url (default "localhost")
-production
Enable the production mode
cd server
go run .
or
docker run -v $(pwd)/server:/server -w /server --net host --rm -ti golang:1.14 go run .
Node version used 13.
cd client
npm install
npm start
or
docker run -v $(pwd)/client:/client -w /client --net host --rm -ti node:13 sh -c 'npm install && npm start'