2020-12-20 15:28:19 +01:00
|
|
|
# CAcert local development setup
|
|
|
|
|
|
|
|
This repository contains a local development environment setup for the CAcert software.
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
* Linux system (tested on Debian Bullseye)
|
|
|
|
* [Docker](https://tracker.debian.org/pkg/docker.io)
|
|
|
|
* [docker-compose](https://pypi.org/project/docker-compose/)
|
|
|
|
* [openssl](https://tracker.debian.org/pkg/openssl)
|
|
|
|
* [myrepos](https://tracker.debian.org/pkg/myrepos)
|
|
|
|
|
|
|
|
```shell
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install docker.io openssl myrepos
|
|
|
|
sudo adduser $USER docker
|
|
|
|
newgrp docker
|
|
|
|
python3 -m pip install --user -U docker-compose
|
|
|
|
# make sure that ~/.local/bin is in $PATH
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2020-12-22 05:57:51 +01:00
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://git.dittberner.info/jan/cacert-devsetup.git
|
|
|
|
cd cacert-devsetup
|
|
|
|
mr checkout
|
|
|
|
```
|
|
|
|
|
2020-12-20 15:28:19 +01:00
|
|
|
Create a .env file that defines the following variables
|
|
|
|
|
|
|
|
Variable | Usage
|
|
|
|
--- | ---
|
|
|
|
`MYSQL_ROOT_PASSWORD` | Database root password
|
|
|
|
`MYSQL_APP_USER` | Database application user
|
|
|
|
`MYSQL_APP_PASSWORD` | Database application password
|
|
|
|
|
|
|
|
```shell
|
2020-12-22 05:57:51 +01:00
|
|
|
echo -e "MYSQL_ROOT_PASSWORD=$(openssl rand -base64 18)\nMYSQL_APP_USER=cacert_dev\nMYSQL_APP_PASSWORD=$(openssl rand -base64 18)" > .env
|
2020-12-20 15:28:19 +01:00
|
|
|
./setup_test_ca.sh
|
|
|
|
docker-compose up
|
|
|
|
```
|
|
|
|
|
|
|
|
After these steps you should be able to reach the CAcert application at https://test.cacert.localhost:8443/.
|