Fix OMK installation
This commit is contained in:
parent
cc259c8122
commit
e52fbfd1f2
5
omk.sh
5
omk.sh
@ -8,8 +8,9 @@ docker build -t omk ${SOURCE_DIR}
|
||||
# Configure OpenMapKit
|
||||
export OMK_ADMIN_USER="admin"
|
||||
export OMK_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||
mkdir -p /srv/omk/conf /srv/omk/data/deployments /srv/omk/data/forms /srv/omk/data/submissions
|
||||
mkdir -p /srv/omk/conf /srv/omk/data
|
||||
chown -R 8007:8007 /srv/omk/data
|
||||
docker run --rm -v /srv/omk/data:/mnt/data omk cp -rp /srv/omk/data/. /mnt/data
|
||||
envsubst <${SOURCE_DIR}/srv/omk/conf/settings.js >/srv/omk/conf/settings.js
|
||||
|
||||
# Configure OpenMapKit service
|
||||
@ -18,6 +19,6 @@ rc-update add omk
|
||||
service omk start
|
||||
|
||||
# Add application definition
|
||||
spotter-appmgr add-app omk "https://omk.{host}/" admin "${OMK_ADMIN_PWD}"
|
||||
spotter-appmgr add-app omk "https://omk.{host}/" "${OMK_ADMIN_USER}" "${OMK_ADMIN_PWD}"
|
||||
spotter-appmgr add-app omk-clients -p clienturl "https://omk.{host}"
|
||||
spotter-appmgr add-app geoodk-clients -p clienturl "https://omk.{host}"
|
||||
|
@ -24,15 +24,15 @@ RUN \
|
||||
|
||||
RUN \
|
||||
# Install build dependencies
|
||||
apk --no-cache add --virtual .deps build-base git py2-pip yarn \
|
||||
apk --no-cache add --virtual .deps build-base git py2-pip \
|
||||
# Clone OpenMapKit
|
||||
&& git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/omk \
|
||||
&& git clone --depth 1 https://github.com/posm/OpenMapKitServer /srv/omk \
|
||||
&& cd /srv/omk \
|
||||
&& git submodule update --init \
|
||||
# Install OpenMapKit dependencies
|
||||
&& pip install -r requirements.txt \
|
||||
&& npm install libxmljs \
|
||||
&& yarn \
|
||||
&& npm install \
|
||||
# Create OS user
|
||||
&& addgroup -S -g 8007 omk \
|
||||
&& adduser -S -u 8007 -h /srv/omk -s /bin/false -g omk -G omk omk \
|
||||
|
Loading…
Reference in New Issue
Block a user