diff --git a/dockerFile b/Dockerfile similarity index 75% rename from dockerFile rename to Dockerfile index dbd793d..b17714b 100644 --- a/dockerFile +++ b/Dockerfile @@ -1,10 +1,9 @@ FROM node WORKDIR /app +COPY package.json ./ +RUN npm install COPY db db COPY methods methods COPY utilities utilities -COPY package.json ./ COPY server.js ./ -COPY config.js ./ -RUN npm install CMD ["node", "server.js"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cdce5b7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3.7' +services: + main: + image: registry.verdnatura.es/smart-tag:${BRANCH_NAME:?} + build: + context: . + dockerfile: Dockerfile + ports: + - 7777 + configs: + - source: config + target: /app/config.js + deploy: + replicas: 1 + placement: + constraints: + - node.role == worker +configs: + config: + external: true + name: smart-tag_config \ No newline at end of file