feat(docker-compose): added docker-compose file

This commit is contained in:
Joan Sanchez 2021-11-22 10:46:19 +01:00
parent ba2fbd7230
commit 8236926a6c
2 changed files with 23 additions and 3 deletions

View File

@ -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"]

21
docker-compose.yml Normal file
View File

@ -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