Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bodysch-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
org
BodySCH
bodysch-backend
Commits
ab4f26e5
Commit
ab4f26e5
authored
4 years ago
by
Rafael László
Browse files
Options
Downloads
Patches
Plain Diff
update node version and cleanup gitlab-ci
parent
2a994aed
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#8223
passed
4 years ago
Stage: Build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-71
1 addition, 71 deletions
.gitlab-ci.yml
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
docker-compose.dev.yml
+0
-24
0 additions, 24 deletions
docker-compose.dev.yml
with
2 additions
and
96 deletions
.gitlab-ci.yml
+
1
−
71
View file @
ab4f26e5
stages
:
stages
:
-
Build
-
Build
# - Test
-
Docker build
-
Deploy
#services:
# - mongo
variables
:
CONTAINER_IMAGE
:
"
registry.kszk.bme.hu/bodysch/backend:$CI_COMMIT_REF_NAME"
# MONGODB_TEST_URI: 'mongodb://mongo/bodysch-test'
Build
:
Build
:
stage
:
Build
stage
:
Build
tags
:
[
docker
]
tags
:
[
docker
]
image
:
node:1
4
image
:
node:1
6
script
:
script
:
-
npm install
-
npm install
cache
:
cache
:
...
@@ -24,63 +14,3 @@ Build:
...
@@ -24,63 +14,3 @@ Build:
expire_in
:
1 day
expire_in
:
1 day
paths
:
paths
:
-
node_modules/
-
node_modules/
#Test:
# stage: Test
# tags: [kszk]
# image: node:14
# script:
# - npm test
# artifacts:
# expire_in: 1 week
# paths:
# - junit.xml
# reports:
# junit: junit.xml
Docker build
:
stage
:
Docker build
tags
:
[
docker
]
only
:
-
master
-
dev
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE
Deploy dev
:
stage
:
Deploy
tags
:
[
kszk-deploy
]
# request the custom SSH executor
only
:
-
dev
script
:
# your deploy logic
-
echo "$REGISTRY_PASSWORD" | docker login registry.kszk.bme.hu --username $REGISTRY_USER --password-stdin
-
cp docker-compose.dev.yml /home/kszk-gitlab-deployer/bodysch-dev/
-
cd /home/kszk-gitlab-deployer/bodysch-dev/
-
docker-compose -f docker-compose.dev.yml --no-ansi pull
-
docker-compose -f docker-compose.dev.yml up -d
-
docker system prune -f
variables
:
SSH_HOST
:
donald.sch.bme.hu
# required
SSH_USER
:
kszk-gitlab-deployer
# default: kszk-gitlab-deployer
SSH_PORT
:
10122
# default: 22
# Deploy prod:
# stage: Deploy
# tags: [kszk-deploy] # request the custom SSH executor
# only:
# - master
# script: # your deploy logic
# - echo "$REGISTRY_PASSWORD" | docker login registry.kszk.bme.hu --username $REGISTRY_USER --password-stdin
# - cp docker-compose.yml /home/kszk-gitlab-deployer/kszkepzes-prod/
# - cd /home/kszk-gitlab-deployer/kszkepzes-prod/
# - docker-compose --no-ansi pull
# - docker-compose up -d
# - docker system prune -f
# variables:
# SSH_HOST: donald.sch.bme.hu # required
# SSH_USER: kszk-gitlab-deployer # default: kszk-gitlab-deployer
# SSH_PORT: 10122 # default: 22
This diff is collapsed.
Click to expand it.
Dockerfile
+
1
−
1
View file @
ab4f26e5
FROM
node:1
4
FROM
node:1
6
WORKDIR
/usr/src/app
WORKDIR
/usr/src/app
...
...
This diff is collapsed.
Click to expand it.
docker-compose.dev.yml
deleted
100644 → 0
+
0
−
24
View file @
2a994aed
version
:
"
3.7"
services
:
bodysch-backend-dev
:
container_name
:
bodysch-backend-dev
image
:
registry.kszk.bme.hu/bodysch/backend:dev
restart
:
always
ports
:
-
"
3030:8000"
links
:
-
bodysch-mongo-dev
env_file
:
-
.env
depends_on
:
-
bodysch-mongo-dev
environment
:
NODE_ENV
:
development
ports
:
-
8000:8000
command
:
npm run start-dev
bodysch-mongo-dev
:
image
:
mongo
expose
:
-
"
27017"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment