|
|
@ -75,3 +75,49 @@ To be able to develop and run diagrams locally on you Mac device, you should hav
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
7. If the unit tests and the bash script `autogen.sh` is working correctly, then your system is now ready for development.
|
|
|
|
7. If the unit tests and the bash script `autogen.sh` is working correctly, then your system is now ready for development.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Windows local development setup
|
|
|
|
|
|
|
|
1. Go to diagrams root directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. Modify the Dockerfile when install fonts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
# Install fonts
|
|
|
|
|
|
|
|
RUN curl -O https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip \
|
|
|
|
|
|
|
|
& mkdir -p /usr/share/fonts/NotoSansCJKjp \
|
|
|
|
|
|
|
|
& unzip NotoSansCJKjp-hinted.zip -d /usr/share/fonts/NotoSansCJKjp/ \
|
|
|
|
|
|
|
|
& rm NotoSansCJKjp-hinted.zip \
|
|
|
|
|
|
|
|
& fc-cache -fv
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. Build the docker image.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
docker build --tag diagrams:1.0 -f ./docker/dev/Dockerfile .
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3. Run the docker-compose file to create the container, run in background and mount the project source code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4. Run unit tests in the host using the container to confirm that it's working.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
docker exec -it diagrams bash
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
python -m unittest tests/*.py -v
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5. Run the bash script `autogen.sh` to test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
docker exec diagrams ./autogen.sh
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6. If the unit tests and the bash script `autogen.sh` is working correctly, then your system is now ready for development.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7. If you use Windows change CRLF to LF in the autogen.sh file.
|