Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ss22-devops-project-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dobromir Palushev
ss22-devops-project-app
Merge requests
!30
pipeline multiple updates
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
pipeline multiple updates
just-a-test
into
staging
Overview
0
Commits
34
Pipelines
0
Changes
4
Merged
Dobromir Palushev
requested to merge
just-a-test
into
staging
2 years ago
Overview
0
Commits
34
Pipelines
0
Changes
4
Expand
updated workflow rules
updated job names
updated container versions
added a template for gke-initialization
0
0
Merge request reports
Compare
staging
staging (base)
and
latest version
latest version
8ba229aa
34 commits,
2 years ago
4 files
+
61
−
51
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
app/Dockerfile
+
24
−
18
Options
@@ -5,36 +5,42 @@ ARG NODEJS_VERSION='16.17.0'
FROM
node:$NODEJS_VERSION-alpine
AS
base
ARG
\
MONGODB_URL_TEST=mongodb://host.docker.internal:27017/todo-app \
JWT_SECRET_TEST=<my-very-secret-jwt>
ENV
\
PORT=3000 \
# For local dev - mongodb://host.docker.internal:27017/todo-app
MONGODB_URL=<should-be-dynamically-set> \
JWT_SECRET=<should-be-dynamically-set>
MONGODB_URL=<dynamically-set-from-k8s> \
JWT_SECRET=<dynamically-set-from-k8s>
# ------------------------------------------------------------------
# Test stage
FROM
base
AS
test
#
# Test stage
#
FROM base AS test
# client tests
WORKDIR
/client
#
# client tests
#
WORKDIR /client
COPY
./client .
# COPY ./client .
# RUN npm ci --no-audit --no-fund
RUN
npm
ci
--no-audit
--no-fund
#
RUN npm
run test
RUN
npm run
test
# # server tests
# WORKDIR /server
# server tests
WORKDIR
/server
# COPY ./server/src ./src/
COPY
./server/
src ./src
/
#
COPY ./server/
package*.json .
/
COPY
./server/package*.json .
# RUN npm ci --no-audit --no-fund
RUN
npm ci
--no-audit
--no-fund
# ARG MONGODB_URL_TEST
# ARG JWT_SECRET_TEST
# MONGODB_URL and JWT_SECRET are available as env variables
RUN
npm run
test
#
# MONGODB_URL and JWT_SECRET are available as env variables
#
RUN
MONGODB_URL=$MONGODB_URL_TEST JWT_SECRET=$JWT_SECRET_TEST
npm run test
# ------------------------------------------------------------------
# Build stage
@@ -47,7 +53,7 @@ WORKDIR $APP_BUILD_PATH
COPY
./server/src .
COPY
./server/package*.json .
COPY
./server/package*.json .
/
RUN
\
npm ci
--prod
--no-audit
--no-fund
\
Loading