Advertisement
Guest User

Untitled

a guest
Feb 12th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. docker-compose.yml
  2.  
  3. version: '3'
  4. services:
  5. web:
  6. build: ./frontend
  7. ports:
  8. - "80:80"
  9. links:
  10. - node
  11. volumes:
  12. - C:\Users\Phil\Documents\myapp\myapp-docker\frontend\dist\myapp://usr/share/nginx/html
  13. node:
  14. build: ./backend
  15. ports:
  16. - "3000:3000"
  17.  
  18. `````````````````````````````````````````````
  19.  
  20. backend package.json
  21.  
  22. {
  23. "name": "backend",
  24. "version": "1.0.0",
  25. "description": "",
  26. "main": "app.js",
  27. "scripts": {
  28. "test": "echo \"Error: no test specified\" && exit 1",
  29. "start": "node ./package.json"
  30. },
  31. "author": "",
  32. "license": "ISC",
  33. "dependencies": {
  34. "@azure/identity": "^1.0.2",
  35. "@azure/storage-blob": "^12.1.0",
  36. "@znemz/node-memwatch": "^1.0.2",
  37. "azure-arm-rediscache": "^3.0.0",
  38. "bcrypt": "^3.0.8",
  39. "body-parser": "^1.19.0",
  40. "create-hash": "^1.2.0",
  41. "crypto": "^1.0.1",
  42. "dotenv": "^8.2.0",
  43. "express": "^4.17.1",
  44. "jsonwebtoken": "^8.5.1",
  45. "mongoose": "^5.8.11",
  46. "mongoose-redis-cache": "0.0.3",
  47. "mongoose-unique-validator": "^2.0.3",
  48. "multer": "^1.4.2",
  49. "multer-s3": "^2.9.0",
  50. "node-memwatch": "^1.0.1",
  51. "redis": "^3.0.1"
  52. }
  53. }
  54.  
  55.  
  56.  
  57. --------------------------------------------------------------
  58.  
  59. frontend Dockerfile
  60.  
  61. FROM nginx
  62. MAINTAINER Phil
  63.  
  64.  
  65. VOLUME C:\Users\Phil\Documents\myapp\myapp-docker\frontend\dist\myapp://usr/share/nginx/html
  66.  
  67. EXPOSE 80
  68.  
  69. --------------------------------------------------------------
  70.  
  71.  
  72.  
  73. backend Dockerfile
  74.  
  75. FROM node
  76.  
  77. MAINTAINER Phil
  78.  
  79. WORKDIR /src
  80.  
  81. COPY . .
  82.  
  83. RUN npm install
  84.  
  85. RUN npm install -g nodemon
  86.  
  87.  
  88. EXPOSE 3000
  89.  
  90. CMD ["npm", "start"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement