From 0a261626c882ae5aeb19ff8928a23a21f7c06ed7 Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 30 Jan 2020 15:29:30 +0300 Subject: [PATCH] docker --- Dockerfile | 10 ++++++++++ docker-compose.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..81552e9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:11 +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install && npm cache clean --force +COPY . . + +EXPOSE 3000 +HEALTHCHECK CMD curl -f http://localhost:3000/ +CMD ["npm", "run", "start"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c0aee49 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,30 @@ +version: '2' +services: + app: + build: . + restart: always + environment: + VIRTUAL_HOST: trustedaf.poma.in + LETSENCRYPT_HOST: trustedaf.poma.in + nginx_client_max_body_size: 50m + MYSQL_HOST: mysql + env_file: .env + volumes: + - /data/powers/verify_contribution:/app/verify_contribution + + mysql: + image: mysql:5.7 + restart: always + env_file: .env + environment: + MYSQL_RANDOM_ROOT_PASSWORD: 'true' + volumes: + - mysql:/var/lib/mysql + +volumes: + mysql: + +networks: + default: + external: + name: frontend_default \ No newline at end of file