fix(docker): made some fixes to the Docker stuff for production

This commit is contained in:
Chris Troutner
2019-06-13 09:50:30 -07:00
parent d349d26e9c
commit 4631b73999
2 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
koa-mongodb:
image: mongo
container_name: mongo-koa
ports:
- "5555:27017" # <host port>:<container port>
volumes:
@@ -12,10 +13,11 @@ koa-mongodb:
koa:
build: ./production/
dockerfile: Dockerfile
container_name: koa
links:
- koa-mongodb
ports:
- "5000:5000" # <host port>:<container port>
- "5001:5001" # <host port>:<container port>
volumes:
# - ./logs:/home/coinjoin/consolidating-coinjoin/logs
- ./keys:/home/safeuser/keys
+6 -5
View File
@@ -22,9 +22,6 @@ WORKDIR /home/safeuser
#RUN echo "export PATH=~/.npm-global/bin:$PATH" >> /home/safeuser/.profile
#RUN runuser -l safeuser -c "npm config set prefix '~/.npm-global'"
# Expose the port the API will be served on.
EXPOSE 5000
# Switch to user account.
USER safeuser
# Prep 'sudo' commands.
@@ -41,14 +38,18 @@ RUN mkdir keys
WORKDIR /home/safeuser/koa
# For development: switch to unstable branch
RUN git checkout docker
# RUN git checkout unstable
# Install dependencies
RUN npm install
# Generate the API docs
RUN npm run docs
VOLUME /home/safeuser/keys
EXPOSE 3000
# Expose the port the API will be served on.
EXPOSE 5001
# Start the application.
COPY start-production start-production