diff --git a/apollo-gateway/Dockerfile b/apollo-gateway/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d0ec9c9cb4f420dd0147cca4d0e736347388af50 --- /dev/null +++ b/apollo-gateway/Dockerfile @@ -0,0 +1,11 @@ +FROM node:14 + +COPY . /opt/app + +WORKDIR /opt/app + +RUN npm install + +EXPOSE 5000 + +CMD npm start \ No newline at end of file diff --git a/comments-service/Dockerfile b/comments-service/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c4303bdd4fbcefaabf54381a2b8dbfe5551e4d94 --- /dev/null +++ b/comments-service/Dockerfile @@ -0,0 +1,11 @@ +FROM node:14 + +COPY . /opt/app + +WORKDIR /opt/app + +RUN npm install + +EXPOSE 5003 + +CMD npm start \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e8a62b4876c384921f014f91167bfee3065ea2d3 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,34 @@ +version: "3" +services: + apollo-gateway: + build: "./apollo-gateway" + depends_on: + - users-service + - posts-service + - comments-service + volumes: + - ./apollo-gateway:/opt/app + ports: + - 5000:5000 + + users-service: + build: "./users-service" + volumes: + - ./users-service:/opt/app + - /opt/app/node_modules + ports: + - 5001:5001 + + posts-service: + build: "./posts-service" + volumes: + - ./posts-service:/opt/app + ports: + - 5002:5002 + + comments-service: + build: "./comments-service" + volumes: + - ./comments-service:/opt/app + ports: + - 5003:5003 \ No newline at end of file diff --git a/posts-service/Dockerfile b/posts-service/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4306abe89aa5d93583b2db3c67de635a89adc3e7 --- /dev/null +++ b/posts-service/Dockerfile @@ -0,0 +1,11 @@ +FROM node:14 + +COPY . /opt/app + +WORKDIR /opt/app + +RUN npm install + +EXPOSE 5002 + +CMD npm start \ No newline at end of file diff --git a/users-service/Dockerfile b/users-service/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b27ddbaeb2da3818c19dc27f45bb4cf424bd598b --- /dev/null +++ b/users-service/Dockerfile @@ -0,0 +1,11 @@ +FROM node:14 + +COPY . /opt/app + +WORKDIR /opt/app + +RUN npm install + +EXPOSE 5001 + +CMD npm start \ No newline at end of file