dockerfile
parent
8789391648
commit
aadd145eef
|
|
@ -1,12 +0,0 @@
|
||||||
FROM node:12.18.1
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
EXPOSE 8111
|
|
||||||
CMD [ "node", "app.js 8111" ]
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
FROM node:12.18.1 as angular
|
||||||
|
|
||||||
|
WORKDIR /app/Client
|
||||||
|
|
||||||
|
COPY ./Client/package*.json .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY ./Client .
|
||||||
|
|
||||||
|
RUN node node_modules/@angular/cli/bin/ng build --prod --configuration=production
|
||||||
|
|
||||||
|
WORKDIR /app/Server
|
||||||
|
|
||||||
|
COPY ./Server/package*.json .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY ./Server .
|
||||||
|
|
||||||
|
EXPOSE 8111
|
||||||
|
CMD [ "node", "src/app.js 8111" ]
|
||||||
15
drone.yml
15
drone.yml
|
|
@ -2,22 +2,13 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
steps:
|
steps:
|
||||||
- name: dockerize
|
- name: node
|
||||||
image: docker
|
image: docker
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker_sock
|
- name: ofb_angular
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- cd Server
|
- docker build --tag ofb_angular .
|
||||||
- docker-compose up -d
|
|
||||||
|
|
||||||
- name: build_client
|
|
||||||
image: node
|
|
||||||
commands:
|
|
||||||
- cd Client
|
|
||||||
- npm install
|
|
||||||
- node node_modules/@angular/cli/bin/ng build --prod --configuration=production
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue