Quick start with devstack
When you want to try start explore CzechIdM from developer view and you don't have enough free time, is possible use our Docker with setup all necessary applications and service. Docker url: https://hub.docker.com/r/bcvsolutions/czechidm-dev/. Using this Docker container is very simple.
0. Prerequisites
- Operation system based on linux
1. Install docker
Please follow some of installation guide for docker, or follow official installation guide from Docker. Installation guide for Ubuntu, Debian, Fedora and CentOS
2. Pull docker image
$ docker pull bcvsolutions/czechidm-dev:7.6.1
3. Start new container
$ docker run -ti -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v "`pwd`":/workspace bcvsolutions/czechidm-dev:7.6.1
Parameters:
- t: Allocate a pseudo-TTY,
- i: Keep STDIN open even if not attached,
- e: Set environment variables,
- DISPLAY=$DISPLAY: attribute display in docker environment will be same as in your environment,
- v: Bind mount a volume,
- "`pwd`":/workspace your shared folder with container More info.
After Eclipse and Atom will loaded you can try develop some new feature and explore CzechIdM product.
Tomcat started by Eclipse. Go to Eclipse → Servers → (right click at Server) Start or Debug server. Application in docker is start in dev
spring profile (all your data will be save into database), feel free change the profile and explore more settings of our application. Settings for dev
profile can be found in files: application.properties
and application-dev.properties
in idm-app module.
4. Start old container
After you create container from our reposiotry is all your work saved to this container and you may continue with this work with simple start this container, is faster than create new container.
$ docker ps -a
This command show you all your containers. Find your container that has image bcvsolutions/czechidm-dev:7.6.1 and replace "<container id>" in the command:
$ docker start <container id>
FAQ
How can I get IP address where running my docker?
With command get a list of your local docker's and find your docker
$ docker ps
Get id of your docker and replace "<container ID>" with your container id:
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container ID>
Find row with IPAddress
. Ip address your docker will be probably 172.17.0.2
. If you have different ip address it will be necessary change IP address in your FE application, if your docker IP is different than 172.17.0.2
please update it in file:frontend/czechidm-app/config/default/development.json
attribute serverUrl
and change ip address, save the file and stop your container and start it again.
Where run backend application?
If you know IP address your docker try this url in your webbrowser:
http://<your docker ip address>:8080/idm-backend/api/v1/status
Example:
http://172.17.0.2:8080/idm-backend/api/v1/status
You receive information with backend application status. Backend application started on tomcat with 8080
port.
Where run frontend application?
Frontend application running automatically after you start docker container at port 3000
and docker IP example:
http://172.17.0.2:3000
Can I connect to docker terminal?
Ofcourse, you will need know container id:
$ docker ps -a
Then replace "<container id>" in this command:
$ docker exec -t -i <container id> /bin/bash
Your docker must be started.
Can I connect to postgres database?
Ofcourse, follow the guide how to connect to docker terminal and then simple login as postgres user:
$ su postgres
And then simply start psql
$ psql