Skip to content

Instantly share code, notes, and snippets.

@rtyler
Created October 18, 2016 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtyler/d333e4c7193c967a2f4f8a16d8f054ff to your computer and use it in GitHub Desktop.
Save rtyler/d333e4c7193c967a2f4f8a16d8f054ff to your computer and use it in GitHub Desktop.
FROM jetty:9-alpine
# Add our system dependencies for running jetty and node services inside the
# container
RUN apk update && apk add supervisor nodejs
# Bring our Java backend app over for Jetty
COPY target/*.war /var/lib/jetty/webapps/ROOT.war
# Bring our supervisor configuration for supervisord
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Prepare the front-end portion of the site
RUN mkdir /plugins
COPY OSS-plugin-site /plugins
WORKDIR /plugins
# Make sure all our node dependencies are present and accounted for
RUN npm install
# Reset our working directory
WORKDIR /
# Expose the npm server's port while we're at it
EXPOSE 5000
CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
docker run --rm -ti --net=host \
-e HEADER_FILE=http://localhost:8000/header.html \
-e DATA_FILE_URL=http://localhost:8000/plugins.json.gzip \
jenkinsciinfra/plugin-site
[supervisord]
nodaemon=true
[program:jetty]
command=/docker-entrypoint.sh
directory=/var/lib/jetty
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:frontend]
command=/usr/bin/npm run server
directory=/plugins
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment