diff --git a/.gitignore b/.gitignore index 1455267..37c0a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -141,3 +141,8 @@ cython_debug/ .DS_Store webui/node_modules k8s.yml + +# Elastic Beanstalk Files +.elasticbeanstalk/* +!.elasticbeanstalk/*.cfg.yml +!.elasticbeanstalk/*.global.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 91034bf..cb6c543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,12 @@ All notable changes to this project will be documented in this file. -## Unreleased +## [1.0.8] - 2021-12-10 - Add dependabot monitoring to repository - Allow default port to be defined as an environment variable - Make Dockerfile serve from Nginx instead of webpack serve to improve performance +- Separate development and production environments and add docker-compose files ## [1.0.7] - 2021-12-08 diff --git a/webui/Dockerfile b/Dockerfile similarity index 88% rename from webui/Dockerfile rename to Dockerfile index 5b163d9..8e7efcc 100644 --- a/webui/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ FROM node:alpine AS builder ARG DEFAULT_PORT ENV DEFAULT_PORT=$DEFAULT_PORT -COPY package.json yarn.lock ./ +COPY webui/package.json webui/yarn.lock ./ RUN yarn install && yarn global add webpack -COPY . ./app +COPY ./webui ./app WORKDIR /app RUN yarn build diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..e60a896 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,12 @@ +FROM node:alpine + +# ALlows the user to define a default port to populate the UI. +# Pass a desired value in your docker run/compose environment +ARG DEFAULT_PORT +ENV DEFAULT_PORT=$DEFAULT_PORT + +COPY webui/package.json webui/yarn.lock ./ +RUN yarn install && yarn global add webpack +COPY ./webui ./app +WORKDIR /app +CMD ["yarn", "start"] diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..8fff4fa --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,14 @@ +--- +version: "3.8" +services: + portchecker-dev: + build: + context: . + dockerfile: Dockerfile.dev + container_name: portcheckerio-dev + environment: + - DEFAULT_PORT= + volumes: + - ./webui:/app + ports: + - 8080:8080 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f42cd80 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +--- +version: "3.8" +services: + portchecker: + image: dsgnr/portcheckerio-ui:latest + pull_policy: always + container_name: portcheckerio + ports: + - 80:80 + restart: unless-stopped diff --git a/webui/.gitignore b/webui/.gitignore index 4c7dcee..7d2f2e8 100644 --- a/webui/.gitignore +++ b/webui/.gitignore @@ -1,8 +1,3 @@ .idea dist node_modules - -# Elastic Beanstalk Files -.elasticbeanstalk/* -!.elasticbeanstalk/*.cfg.yml -!.elasticbeanstalk/*.global.yml