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