From 4836794c3c9845b95d57e11165964c89dacfbf81 Mon Sep 17 00:00:00 2001 From: Nadav Spiegelman Date: Wed, 11 Mar 2020 14:24:18 -0400 Subject: [PATCH 1/2] Add docker & docker-compose --- .gitignore | 1 - Dockerfile | 13 +++++++++++++ README.md | 3 +-- docker-compose.yml | 11 +++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 8ef8495a..b1adbf53 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,4 @@ build .DS_Store .idea/* .env -docker-compose.yml npm-debug.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..344a8387 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:12-alpine +LABEL maintainer="Nadav Spiegelman " + +RUN mkdir /app +WORKDIR /app + +COPY . . + +RUN yarn install + +EXPOSE 3000 + +ENTRYPOINT yarn start diff --git a/README.md b/README.md index 5b7eda84..edd8b41d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,5 @@ A web app to help do things with ConnectWise. Assumes repo is cloned and docker daemon is running. -1. Duplicate `docker-compose.yml.sample` to `docker-compose.yml` -1. Replace environment variables prefixed with `REACT_APP` +0. Create your .env file as described above. 1. `docker-compose up` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..a8fd8dc3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + node: + image: nadavspi/unwiseconnect + volumes: + - ".:/app" + ports: + - 3000:3000 + env_file: + - .env + command: ["yarn", "start"] From 24c283bc006b32c3a18975fffdc7138d8285ba6c Mon Sep 17 00:00:00 2001 From: Nadav Spiegelman Date: Wed, 11 Mar 2020 14:35:03 -0400 Subject: [PATCH 2/2] Remove outdated example --- docker-compose.yml.example | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 docker-compose.yml.example diff --git a/docker-compose.yml.example b/docker-compose.yml.example deleted file mode 100644 index 5fba2fe4..00000000 --- a/docker-compose.yml.example +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' -services: - node: - image: node:12 - volumes: - - ".:/app" - ports: - - 3000:3000 - - 35729:35729 - working_dir: /app - environment: - - NODE_ENV=development - - CHOKIDAR_USEPOLLING=true - - REACT_APP_FIREBASE_API= - - REACT_APP_FIREBASE_DOMAIN=example.firebaseapp.com - - REACT_APP_FIREBASE_DATABASE=https://example.firebaseio.com - - REACT_APP_FIREBASE_BUCKET=example.appspot.com - - REACT_APP_FIREBASE_SENDER=12345678 - - REACT_APP_API_KEY= - - REACT_APP_API_URL=https://example.herokuapp.com - - REACT_APP_CONNECTWISE_SERVER_URL=https://connectwise.example.com/v1_0_release - command: bash -c "yarn install && yarn start"