🐳Run with Docker
How to use Identifo Docker image
Running in stateless mode
The simplest way to get acquainted with Identifo is to run the official Docker image:
docker run -p 8081:8081 madappgangd/identifo:latest This command launches Identifo with default settings and allows you to access:
admin panel on http://localhost:8081/adminpanel
use default login
[email protected]and default passwordpassword
web app on http://localhost:8081/web
JSON API on http://localhost:8081/api
All the configuration and application data is stored on a temporary filesystem in Docker container, so all your changes to settings and data (users and apps) will be lost after container stops. There are a couple of ways to address that (please see the sections below).
Preserving state across container restarts
To introduce state to the above setup, Docker bind mounts or Docker volumes can be used for either configuration or application data, or both; Identifo also allows for using AWS S3 a persistent configuration storage.
Preserving configuration changes
The simplest way to introduce state is to create a folder on the host machine, place a config file there and bind mount it to the Docker container. You can download the default config file from the Identifo repository and use it as is:
mkdir data #create a directory for Identifo data
curl -o data/config.yaml https://raw.githubusercontent.com/MadAppGang/identifo/master/cmd/config-boltdb.yamlNow run the image specifying a mount:
This way, all the updates made to configuration will be reflected in the data/config.yaml file on your host machine.
--config flag also accepts S3 prefixes as a valid config file location:
Preserving users and applications
Default Identifo configuration uses BoltDB as a persistent storage for application data, with database file located under /data folder. Similar to the example with preserving configuration changes, to make application data survive container restarts, you can either mount the /data folder from the host filesystem, or create a Docker volume.
Use the following command to create and use a Docker-managed volume called identifo-data:
To get the details about this volume: docker volume inspect identifo-data.
To delete the volume: docker volume rm identifo-data.
Another option is to mount a host's folder when running the Docker image:
This command will use ./data directory on your host filesystem as a /data folder in Docker container filesystem. Just ensure the directory exists on your host machine, Docker will not create it for you.
Last updated
Was this helpful?