Update to work with new Xen-Orchestra repo and structure. Minor updates on top of it

This commit is contained in:
ronivay
2018-02-24 18:18:39 +02:00
parent 55c7d01875
commit c5545e631c
3 changed files with 37 additions and 51 deletions

View File

@@ -4,8 +4,8 @@ MAINTAINER Roni Väyrynen <roni@vayrynen.info>
# Install set of dependencies to support running Xen-Orchestra
# Node v6
RUN curl -s -L https://rpm.nodesource.com/setup_6.x | bash -
# Node v8
RUN curl -s -L https://rpm.nodesource.com/setup_8.x | bash -
# yarn for installing node packages
RUN curl -s -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo
@@ -22,23 +22,21 @@ RUN yum -y install monit
ADD monit-services /etc/monit.d/services
# Fetch Xen-Orchestra sources from git stable branch
RUN git clone -b stable http://github.com/vatesfr/xo-server /etc/xo-server
RUN git clone -b stable http://github.com/vatesfr/xo-web /etc/xo-web
RUN git clone -b master https://github.com/vatesfr/xen-orchestra /etc/xen-orchestra
# Run build tasks against sources
RUN cd /etc/xo-server && yarn
RUN cd /etc/xo-web && yarn
RUN cd /etc/xen-orchestra && yarn && yarn build
# Fix path for xo-web content in xo-server configuration
RUN sed -i "s/#'\/': '\/path\/to\/xo-web\/dist\//'\/': '..\/xo-web\/dist\//" /etc/xo-server/sample.config.yaml
# Move edited config sample to place
RUN mv /etc/xo-server/sample.config.yaml /etc/xo-server/.xo-server.yaml
RUN mv /etc/xen-orchestra/packages/xo-server/sample.config.yaml /etc/xen-orchestra/packages/xo-server/.xo-server.yaml
# Install forever for starting/stopping Xen-Orchestra
RUN npm install forever -g
WORKDIR /etc/xo-server
WORKDIR /etc/xen-orchestra/xo-server
EXPOSE 80

View File

@@ -1,8 +1,8 @@
set init
check process xo-server with pidfile /var/run/xo-server.pid
start program = "/usr/bin/forever start --pidFile /var/run/xo-server.pid --sourceDir /etc/xo-server bin/xo-server"
stop program = "/usr/bin/forever stop /etc/xo-server/bin/xo-server"
start program = "/usr/bin/forever start --pidFile /var/run/xo-server.pid --sourceDir /etc/xen-orchestra/packages/xo-server bin/xo-server"
stop program = "/usr/bin/forever stop /etc/xen-orchestra/packages/xo-server/bin/xo-server"
check process redis with pidfile /var/run/redis/redis.pid