diff --git a/Server/dockerfile b/Server/dockerfile deleted file mode 100644 index ef0fbfe..0000000 --- a/Server/dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:12.18.1 - -WORKDIR /app - -COPY . . - -WORKDIR /src - -RUN npm install - -EXPOSE 8111 -CMD [ "node", "app.js 8111" ] \ No newline at end of file diff --git a/Server/docker-compose.yml b/docker-compose.yml similarity index 100% rename from Server/docker-compose.yml rename to docker-compose.yml diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..21a1905 --- /dev/null +++ b/dockerfile @@ -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" ] \ No newline at end of file diff --git a/drone.yml b/drone.yml index d1a9cbd..5f5c66e 100644 --- a/drone.yml +++ b/drone.yml @@ -2,22 +2,13 @@ kind: pipeline type: docker name: default steps: -- name: dockerize +- name: node image: docker volumes: - - name: docker_sock + - name: ofb_angular path: /var/run/docker.sock commands: - - cd Server - - 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 - + - docker build --tag ofb_angular . volumes: