Newer
Older
## Requirements ##
We use docker and docker-compose to deploy CaosDB:
- Docker >= 18.02
- docker-compose >= 1.21
On a Debian system, you can install the requirements with:
```sh
sudo apt-get install docker.io docker-compose
```
Note, that your user account needs to be in the docker group to start a
container:
```sh
sudo usermod -aG docker $USER
```
Once you have docker installed, you only need two configuration files: One
for the reverse proxy envoy `envoy.yml` and one that defines the docker containers that
you want to use and how they can interact `docker-compose.yml`. You can copy the
`compose` folder of this repository to your computer and then run
```sh
docker-compose -f compose/docker-compose.yml up
```
Once the logs read
```
caosdb-server_1 | Starting the Jetty [HTTPS/1.1] server on port 10443
caosdb-server_1 | Starting the Jetty [HTTP/1.1] server on port 10080
caosdb-server_1 | Starting org.caosdb.server.CaosDBServer application
```
the server is ready and you can access CaosDB with your web browser under `localhost:8081`.
## Stopping CaosDB ##
You can stop the containers with CTRL-C. See the documentation of docker-compose
for other options (e.g. `-d` for detach).
Note, that the suggested configuration provided here uses persistent volumes.
This means that data and files will be stored such that they are persistent
across restarts.
## Building the image
You can build the docker image using the `docker` command in the `docker` folder:
```sh
cd docker
DOCKER_BUILDKIT=1 docker build -t caosdb .
```
The buildkit setting allows the usage of some special features in the `Dockerfile`.
The image will be named `caosdb`.
If you want to use SSL certificates (and in production use, you definitely should)
you need to uncomment the respective sections in `envoy.yml` and `docker-compose.yml`.
The given configuration assumes, that the certificate files are placed in a folder
`compose/certs` and named `caosdb.key.pem` and `caosdb.cert.pem`.
It is assumed, that `caosdb.key.pem` does not have a passphrase. You can remove one
with `openssl rsa -in oldKey.pem -out newKey.key`.
### Bind IP
If you want your server to be accessible from other computers, you need to change
the bind ip. Adjust the compose file accordingly.
## Integration Tests
## Troubleshooting
### Envoy cannot read SSL certificate files
Make sure that the user that is used by envoy has read permissions.