You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.2 KiB

Intro
=====
This is a very basic example of how one can build the foreman from sources and make a container out of it.
The mariadb container is not even used in this example, but you can use it on your own.
Running the Foreman
===================
```
cd foreman/
docker-compose run -d
```
Foreman credentials
===================
You can get the foreman "Login credentials" when the container foreman-data is running seeds on built.
It will look like this
```
Login credentials: admin / PassWoRd
```
Connecting to the Foreman Web
=============================
Get the IP of the nginx-passenger container
```
docker exec -ti foreman_nginx-passenger_1 ip a
```
Add the following line to your `/etc/hosts` file
```
172.21.0.3 foreman-web
```
In my case the nginx-passenger's IP was 172.21.0.3
After that run your favorite browser and access the `http://foreman-web` :-)
Working inside the container
============================
```
docker exec -ti foreman_foreman-data_1 /bin/sh
$ cd /src/foreman
/src/foreman $ bundle exec rake -T
```
After you have changed something, don't forget to kill -HUP <pidof nginx> in the foreman_nginx-passenger_1 container.
Logs
====
Logs stored at the `/src/foreman/log/production.log`