Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Dec 15, 2015
2 parents e1f55c5 + 1de696a commit d9cef0a
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
# Dockerfile for the PDC's DCLAPI service
#
# Base image
#
# Drug Class Lookup API used by the PDC's Hub API (HAPI).
#
# Example:
# sudo docker pull pdcbc/dclapi
# sudo docker run -d --name=dclapi -h dclapi --restart=always pdcbc/dclapi
#
# External port (for testing)
# - DCLAPI: -p <hostPort>:3007
#
# Releases
# - https://github.com/PDCbc/dclapi/releases
#
#
FROM phusion/passenger-nodejs
MAINTAINER derek.roberts@gmail.com
ENV RELEASE 0.1.2


# Update system
# Packages
#
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'Dpkg::Options{ "--force-confdef"; "--force-confold" }' \
>> /etc/apt/apt.conf.d/local
RUN apt-get update; \
apt-get upgrade -y
apt-get install \
git; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


# Prepare /app/ folder
#
WORKDIR /app/
RUN git clone https://github.com/pdcbc/dclapi.git -b ${RELEASE} .; \
npm install; \
chown -R app:app /app/


# Create startup script and make it executable
#
RUN mkdir -p /etc/service/app/
RUN ( \
RUN mkdir -p /etc/service/app/; \
( \
echo "#!/bin/bash"; \
echo "#"; \
echo "set -e -o nounset"; \
Expand All @@ -28,16 +50,8 @@ RUN ( \
echo "cd /app/"; \
echo "/sbin/setuser app npm start"; \
) \
>> /etc/service/app/run
RUN chmod +x /etc/service/app/run


# Prepare /app/ folder
#
WORKDIR /app/
COPY . .
RUN npm install
RUN chown -R app:app /app/
>> /etc/service/app/run; \
chmod +x /etc/service/app/run


# Run Command
Expand Down

0 comments on commit d9cef0a

Please sign in to comment.