diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e537e12 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +dist +*.log +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8212c4d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM node:16 + + +RUN apt-get update && apt-get install -y \ + apt-transport-https \ + ca-certificates \ + libaio1 \ + unzip \ + wget \ + libc6 \ + libncurses5 && \ + mkdir -p /opt/oracle && \ + wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip -O /opt/oracle/instantclient-basic-linuxx64.zip && \ + unzip /opt/oracle/instantclient-basic-linuxx64.zip -d /opt/oracle && \ + rm /opt/oracle/instantclient-basic-linuxx64.zip && \ + ln -s /opt/oracle/instantclient_* /opt/oracle/instantclient && \ + echo "/opt/oracle/instantclient" > /etc/ld.so.conf.d/oracle-instantclient.conf && \ + ldconfig + + +WORKDIR /app + + +COPY package*.json ./ + + +RUN npm install --legacy-peer-deps + +COPY . . + + +CMD ["npm", "run", "start:prod"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6aa3eac --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.8' + +services: + vendaweb: + image: link70/vendaweb + deploy: + replicas: 20 + resources: + limits: + cpus: '0.5' + memory: 512M + ports: + - "8065:8065" + restart: always \ No newline at end of file