Skip to content

Commit

Permalink
Removed local storage hostname volume in mongo.deployment.yml due to …
Browse files Browse the repository at this point in the history
…issue with mongo and Docker for Windows.
  • Loading branch information
Dan Wahlin authored and Dan Wahlin committed Mar 26, 2019
1 parent 0995a9c commit cc9dea9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .docker/node-codewithdan.production.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ LABEL author="Dan Wahlin"

WORKDIR /var/www/codewithdan

COPY . .
COPY ./package.json .
COPY ./package-lock.json .

ENV NODE_ENV production
RUN npm install -g pm2@latest
RUN npm install

COPY . .

RUN mkdir -p /var/log/pm2

Expand Down
16 changes: 9 additions & 7 deletions .k8s/mongo.deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ spec:
labels:
app: mongo
spec:
volumes:
- name: mongo-volume
persistentVolumeClaim:
claimName: mongo-pvc
# Can uncomment following lines if on Mac/Linux (issue on Docker for Windows prevents this from working)
# volumes:
# - name: mongo-volume
# persistentVolumeClaim:
# claimName: mongo-pvc
containers:
- env:
- name: MONGODB_DBNAME
Expand Down Expand Up @@ -135,7 +136,8 @@ spec:
ports:
- containerPort: 27017
resources: {}
volumeMounts:
- name: mongo-volume
mountPath: /data/db
# Can uncomment following lines if on Mac/Linux (issue on Docker for Windows prevents this from working)
# volumeMounts:
# - name: mongo-volume
# mountPath: /data/db

0 comments on commit cc9dea9

Please sign in to comment.