tidyups for image building chapter

This commit is contained in:
BillMills 2019-06-19 11:22:15 -04:00
parent 7b8510945e
commit 4c04d52c3c
6 changed files with 4 additions and 112 deletions

View File

@ -1,48 +0,0 @@
version: '3.7'
services:
bb-db:
image: ${dockerId}/bb-db:v3
build:
context: ./bulletin-board-db
networks:
- bb-net
volumes:
- sqlbackup:/var/opt/mssql
bb-app:
image: ${dockerId}/bb-app:v3.3
build:
context: ./bulletin-board-app
dockerfile: Dockerfile.v3.3
networks:
- bb-net
configs:
- source: logConfig
target: /app/config/logConfig.js
secrets:
- source: dbConfig
target: /app/config/dbConfig.js
bb-proxy:
image: ${dockerId}/bb-proxy:v3
build:
context: ./bulletin-board-proxy
ports:
- "80:80"
networks:
- bb-net
networks:
bb-net:
volumes:
sqlbackup:
configs:
logConfig:
external: true
secrets:
dbConfig:
external: true

View File

@ -3,8 +3,6 @@ version: '3.7'
services:
bb-db:
image: ${dockerId}/bb-db:v3
build:
context: ./bulletin-board-db
networks:
- bb-net
volumes:
@ -12,17 +10,13 @@ services:
bb-app:
image: ${dockerId}/bb-app:v3
build:
context: ./bulletin-board-app
networks:
- bb-net
bb-proxy:
image: ${dockerId}/bb-proxy:v3
build:
context: ./bulletin-board-proxy
ports:
- "80:80"
- "8000:80"
networks:
- bb-net
@ -30,4 +24,4 @@ networks:
bb-net:
volumes:
sqlbackup:
sqlbackup:

View File

@ -1,10 +1,5 @@
FROM node:6.11.5
FROM node
WORKDIR /usr/src/app
COPY package.json .
COPY . .
RUN npm install
EXPOSE 8080
CMD [ "npm", "start" ]
COPY . .

View File

@ -1,15 +0,0 @@
FROM node AS builder
WORKDIR /src
COPY package.json .
RUN npm install
# app image
FROM node
EXPOSE 8080
CMD npm start
WORKDIR /app
COPY --from=builder /src/node_modules/ /app/node_modules/
COPY . .

View File

@ -1,15 +0,0 @@
FROM node AS builder
WORKDIR /src
COPY package.json .
RUN npm install
# app image
FROM node:alpine
EXPOSE 8080
CMD npm start
WORKDIR /app
COPY --from=builder /src/node_modules/ /app/node_modules/
COPY . .

View File

@ -1,19 +0,0 @@
FROM node:10.15-stretch AS builder
WORKDIR /src
COPY package.json .
RUN npm install
# app image
FROM node:10.15.3-alpine
EXPOSE 8080
CMD [ "node", "server.js" ]
USER node
HEALTHCHECK --interval=5s --timeout=10s --start-period=15s \
CMD [ "node", "healthcheck.js" ]
WORKDIR /app
COPY --from=builder /src/node_modules/ /app/node_modules/
COPY . .