Skip to content

Commit

Permalink
Merge pull request #9 from dsgnr/docker-compose
Browse files Browse the repository at this point in the history
Separate dev and prod environments
  • Loading branch information
dsgnr authored Dec 10, 2021
2 parents 6eb968a + c55f13b commit 61ab8c5
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,8 @@ cython_debug/
.DS_Store
webui/node_modules
k8s.yml

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions webui/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -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"]
14 changes: 14 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions webui/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.idea
dist
node_modules

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

0 comments on commit 61ab8c5

Please sign in to comment.