Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- docker-compose.yml
- version: '3'
- services:
- web:
- build: ./frontend
- ports:
- - "80:80"
- links:
- - node
- volumes:
- - C:\Users\Phil\Documents\myapp\myapp-docker\frontend\dist\myapp://usr/share/nginx/html
- node:
- build: ./backend
- ports:
- - "3000:3000"
- `````````````````````````````````````````````
- backend package.json
- {
- "name": "backend",
- "version": "1.0.0",
- "description": "",
- "main": "app.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1",
- "start": "node ./package.json"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "@azure/identity": "^1.0.2",
- "@azure/storage-blob": "^12.1.0",
- "@znemz/node-memwatch": "^1.0.2",
- "azure-arm-rediscache": "^3.0.0",
- "bcrypt": "^3.0.8",
- "body-parser": "^1.19.0",
- "create-hash": "^1.2.0",
- "crypto": "^1.0.1",
- "dotenv": "^8.2.0",
- "express": "^4.17.1",
- "jsonwebtoken": "^8.5.1",
- "mongoose": "^5.8.11",
- "mongoose-redis-cache": "0.0.3",
- "mongoose-unique-validator": "^2.0.3",
- "multer": "^1.4.2",
- "multer-s3": "^2.9.0",
- "node-memwatch": "^1.0.1",
- "redis": "^3.0.1"
- }
- }
- --------------------------------------------------------------
- frontend Dockerfile
- FROM nginx
- MAINTAINER Phil
- VOLUME C:\Users\Phil\Documents\myapp\myapp-docker\frontend\dist\myapp://usr/share/nginx/html
- EXPOSE 80
- --------------------------------------------------------------
- backend Dockerfile
- FROM node
- MAINTAINER Phil
- WORKDIR /src
- COPY . .
- RUN npm install
- RUN npm install -g nodemon
- EXPOSE 3000
- CMD ["npm", "start"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement