Installation

1. Installation aus den Quellen

mkdir -p ~/projects && cd ~/projects
git clone git@bitbucket.org:locr/vmsconfigurationserver.git VmsConfigurationServer
cd VmsConfigurationServer
git submodule update --init --recursive

2. Container Service installieren

SERVICE_NAME=vms2-configuration-server SERVICE_PORT=2005 VCS_STYLES_PATH=${PWD}/styles.vms2 ./scripts/install_service.sh

3. Container Service für Entwicklung erstellen und starten

SERVICE_NAME=vms2-configuration-server SERVICE_PORT=2005 VCS_STYLES_PATH=${PWD}/styles.vms2 ./scripts/install_service.sh --env=dev

4. Update scripts im home-Verzeichnis erstellen

cat <<EOF >~/update_vms2_configuration_server.sh
#!/usr/bin/env bash

cd ${PWD}/scripts
SERVICE_NAME=vms2-configuration-server SERVICE_PORT=2005 VCS_STYLES_PATH=${PWD}/styles.vms2 ./update_service.sh
EOF

chmod +x ~/update_vms2_configuration_server.sh

5. nginx konfigurieren

sudo cp installation_files/nginx/conf.d/vms2-configuration-server /etc/nginx/conf.d

Sicherstellen, dass die folgenden Zeilen in der Datei /etc/nginx/sites-enabled/default existieren.

server {
    ...
    include conf.d/vms2-configuration-server;
    ...
}

nginx service neustarten

sudo service nginx restart

6. Basis Aufrufe

Listet alle verfügbaren Konfigurationen auf

http://localhost:2005/configurations/list.json

zeigt eine bestimmte Konfiguration an

http://localhost:2005/get_configuration/locr-3203-300-svg.json

Modifiziert ein Icon und zeigt es an

http://localhost:2005/icon_data/images/icons/shields/shield_5.svg?colorize=yellow&vector_scale=0.5