Skip to content

Commit

Permalink
Marging changes (#1)
Browse files Browse the repository at this point in the history
[SQUASH] Ver. 1.0.0
  • Loading branch information
and-ratajski authored Nov 28, 2022
1 parent 46f56e0 commit 1061418
Show file tree
Hide file tree
Showing 43 changed files with 4,622 additions and 159 deletions.
3 changes: 1 addition & 2 deletions .docker/development.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ FROM node:16-alpine AS builder
ARG node_env_type=development

WORKDIR /app

COPY ./app .

ENV NODE_ENV ${node_env_type}

RUN yarn
CMD [ "yarn", "start:dev" ]
14 changes: 11 additions & 3 deletions .docker/production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ FROM node:16-alpine AS builder
ARG node_env_type=production

WORKDIR /app

COPY ./app .

ENV NODE_ENV ${node_env_type}
ENV NODE_ENV development
RUN yarn

# Copy compilation product (dist folder) from builder
FROM builder AS final

RUN yarn
WORKDIR /app

ENV NODE_ENV ${node_env_type}
RUN yarn build
RUN rm -rf src tests
CMD [ "node", "dist/app.js" ]
9 changes: 6 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
**/.DS_Store
**/.AppleDouble
**/.LSOverride

# Ignore .git and .cache folders
.git
Expand Down Expand Up @@ -35,3 +35,6 @@
*.md
!README*.md
README-secret.md

# Project specfic
app/coverage
45 changes: 45 additions & 0 deletions .github/workflows/ci-qg-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Basic CI task for development and production. It assures that code is kept
# unit-tested. Test coverage is not checked.

name: Quality Gate -> Unit Tests on Development Environment
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop, main ]

jobs:

unit-tests:
runs-on: ubuntu-latest
name: Run unit tests
steps:
- name: Check-out last commit
uses: actions/checkout@v2
- name: Build docker DEV image
run: make build-dev-env
- name: Run unit tests
run: make run-unit-tests

lint-check:
runs-on: ubuntu-latest
name: Run lint check
steps:
- name: Check-out last commit
uses: actions/checkout@v2
- name: Build docker DEV image
run: make build-dev-env
- name: Run lint check
run: make run-lint-check

docker-build-prod:
needs: [unit-tests, lint-check]
runs-on: ubuntu-latest
name: Build Docker Production Image (Test)
steps:
- name: Check-out last commit
uses: actions/checkout@v2
- name: Use example .env file
run: cat ./app/.env.example | sed 's/ENVIRONMENT=development/ENVIRONMENT=production/' > ./app/.env
- name: Build PROD instance (image)
run: make build-prod-env
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride


# Icon must end with two \r
Icon

Expand Down
Loading

0 comments on commit 1061418

Please sign in to comment.