Skip to content

Commit 1061418

Browse files
authored
Marging changes (#1)
[SQUASH] Ver. 1.0.0
1 parent 46f56e0 commit 1061418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4622
-159
lines changed

Diff for: .docker/development.Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ FROM node:16-alpine AS builder
22
ARG node_env_type=development
33

44
WORKDIR /app
5-
65
COPY ./app .
76

87
ENV NODE_ENV ${node_env_type}
9-
108
RUN yarn
9+
CMD [ "yarn", "start:dev" ]

Diff for: .docker/production.Dockerfile

+11-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ FROM node:16-alpine AS builder
22
ARG node_env_type=production
33

44
WORKDIR /app
5-
65
COPY ./app .
76

8-
ENV NODE_ENV ${node_env_type}
7+
ENV NODE_ENV development
8+
RUN yarn
9+
10+
# Copy compilation product (dist folder) from builder
11+
FROM builder AS final
912

10-
RUN yarn
13+
WORKDIR /app
14+
15+
ENV NODE_ENV ${node_env_type}
16+
RUN yarn build
17+
RUN rm -rf src tests
18+
CMD [ "node", "dist/app.js" ]

Diff for: .dockerignore

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
### macOS ###
22
# General
3-
.DS_Store
4-
.AppleDouble
5-
.LSOverride
3+
**/.DS_Store
4+
**/.AppleDouble
5+
**/.LSOverride
66

77
# Ignore .git and .cache folders
88
.git
@@ -35,3 +35,6 @@
3535
*.md
3636
!README*.md
3737
README-secret.md
38+
39+
# Project specfic
40+
app/coverage

Diff for: .github/workflows/ci-qg-dev.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Basic CI task for development and production. It assures that code is kept
2+
# unit-tested. Test coverage is not checked.
3+
4+
name: Quality Gate -> Unit Tests on Development Environment
5+
on:
6+
push:
7+
branches: [ develop ]
8+
pull_request:
9+
branches: [ develop, main ]
10+
11+
jobs:
12+
13+
unit-tests:
14+
runs-on: ubuntu-latest
15+
name: Run unit tests
16+
steps:
17+
- name: Check-out last commit
18+
uses: actions/checkout@v2
19+
- name: Build docker DEV image
20+
run: make build-dev-env
21+
- name: Run unit tests
22+
run: make run-unit-tests
23+
24+
lint-check:
25+
runs-on: ubuntu-latest
26+
name: Run lint check
27+
steps:
28+
- name: Check-out last commit
29+
uses: actions/checkout@v2
30+
- name: Build docker DEV image
31+
run: make build-dev-env
32+
- name: Run lint check
33+
run: make run-lint-check
34+
35+
docker-build-prod:
36+
needs: [unit-tests, lint-check]
37+
runs-on: ubuntu-latest
38+
name: Build Docker Production Image (Test)
39+
steps:
40+
- name: Check-out last commit
41+
uses: actions/checkout@v2
42+
- name: Use example .env file
43+
run: cat ./app/.env.example | sed 's/ENVIRONMENT=development/ENVIRONMENT=production/' > ./app/.env
44+
- name: Build PROD instance (image)
45+
run: make build-prod-env

Diff for: .gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### macOS ###
2+
# General
3+
.DS_Store
4+
.AppleDouble
5+
.LSOverride
6+
7+
18
# Icon must end with two \r
29
Icon
310

0 commit comments

Comments
 (0)