Docker Build for Kivitendo with lxcars a erp solution for car repair business
- Introduction
- Changelog
- Contributing
- Reporting Issues
- Installation
- Quick Start
- Creating User and Database at Launch
- Configuration
- Upgrading
Dockerfile to build a Lxcars container image which can be linked to other containers. Lxcars is based on Kivitendo. The docker image inherits from kivitendo_docker. Will install Postgres and Apache2 and all the necessary packages for Kivitendo and lxcars.
If you find this image useful here's how you can help:
- Send a Pull Request with your awesome new features and bug fixes
- Help new users with Issues they may encounter
Docker is a relatively new project and is active being developed and tested by a thriving community of developers and testers and every release of docker features many enhancements and bugfixes.
Given the nature of the development and release cycle it is very important that you have the latest version of docker installed because any issue that you encounter might have already been fixed with a newer docker release.
For ubuntu users I suggest installing docker using docker's own package repository since the version of docker packaged in the ubuntu repositories are a little dated.
Here is the shortform of the installation of an updated version of docker on ubuntu.
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install docker-ce
Pull the latest version of the image from the docker index. This is the recommended method of installation as it is easier to update image in the future. These builds are performed by the Docker Trusted Build service.
docker pull drnoa/lxcars_docker:latest
Alternately you can build the image yourself.
git clone https://github.com/drnoa/lxcars_docker.git
cd kivitendo_docker
docker build -t="$USER/lxcars_docker" .
Run the Kivitendo image
docker run --name lxcars_docker -d drnoa/lxcars_docker:latest
Check the ip of your docker container
Got to the administrative interface of kivitendo using the password: admin123 and configure the database. All database users (kivitendo and docker) use docker as password.
The webserver is configured to use port 80 Postgres is reachable on port 5432
Last steps to complete the installation: Under CRM->Admin create the groups Admin and Werkstatt and add one user to each of them.
Alternately you can fetch the password set for the postgres
user from the container logs.
docker logs postgresql
In the output you will notice the following lines with the password:
|------------------------------------------------------------------|
| PostgreSQL User: postgres, Password: xxxxxxxxxxxxxx |
| |
| To remove the PostgreSQL login credentials from the logs, please |
| make a note of password and then delete the file pwfile |
| from the data store. |
|------------------------------------------------------------------|
To test if the postgresql server is working properly, try connecting to the server.
psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} postgresql)
For data persistence a volume should be mounted at /var/lib/postgresql
.
The updated run command looks like this.
docker run --name postgresql -d \
-v /opt/postgresql/data:/var/lib/postgresql drnoa/lxcars_docker:latest
This will make sure that the data stored in the database is not lost when the image is stopped and started again.
By default 'docker' is assigned as password for the postgres user.
You can change the password of the postgres user
psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} postgresql)
\password postgres
To upgrade to newer releases, simply follow this 3 step upgrade procedure.
- Step 1: Stop the currently running image
docker stop $USER/lxcars_docker
- Step 2: Update the docker image.
docker pull drnoa/lxcars_docker:latest
- Step 3: Start the image
docker run --name lxcars_docker -d [OPTIONS] drnoa/lxcars_docker:latest