Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
authentication
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
Container registry
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
services
authentication
Commits
f4f39207
There was a problem fetching the pipeline summary.
Commit
f4f39207
authored
6 years ago
by
FORESTIER Fabien
Browse files
Options
Downloads
Patches
Plain Diff
Add management of image with gitlab docker registry
parent
a35c7e39
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+16
-14
16 additions, 14 deletions
.gitlab-ci.yml
docker-compose.yml
+3
-2
3 additions, 2 deletions
docker-compose.yml
with
19 additions
and
16 deletions
.gitlab-ci.yml
+
16
−
14
View file @
f4f39207
...
...
@@ -8,7 +8,10 @@ build_development:
-
master
script
:
-
export NODE_ENV=DEV
-
docker-compose --project-name service-authentication-dev build
-
export TAG=dev
-
docker-compose build
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose push
deploy_development
:
stage
:
deploy
...
...
@@ -16,23 +19,22 @@ deploy_development:
-
master
script
:
-
export NODE_ENV=DEV
-
docker-compose --project-name service-authentication-dev up -d
build_staging
:
stage
:
build
only
:
-
staging
script
:
-
export NODE_ENV=REC
-
sed -i 's/DEV_/REC_/g' docker-compose.yml
-
docker-compose --project-name service-authentication-rec build
-
export TAG=dev
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose pull
-
docker-compose --project-name service-authentication-${TAG} up -d
deploy_staging
:
stage
:
deploy
only
:
-
staging
-
master
when
:
manual
script
:
-
export TAG=staging
-
export NODE_ENV=REC
-
sed -i 's/DEV_/REC_/g' docker-compose.yml
-
docker-compose --project-name service-authentication-rec up -d
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
TAG=dev docker-compose pull
-
docker tag $CI_REGISTRY/refonte-data/service-authentication:dev $CI_REGISTRY/refonte-data/service-authentication:${TAG}
-
docker push $CI_REGISTRY/refonte-data/service-authentication:${TAG}
-
docker-compose --project-name service-authentication-${TAG} up -d
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
3
−
2
View file @
f4f39207
...
...
@@ -2,8 +2,9 @@ version: '3.1'
services
:
service-authentication
:
container_name
:
service-authentication-${
NODE_ENV
}
container_name
:
service-authentication-${
TAG
}
build
:
.
image
:
registry.alpha.grandlyon.com/refonte-data/service-authentication:${TAG}
ports
:
-
${DEV_SERVICE_PORT}:3000
environment
:
...
...
@@ -23,7 +24,7 @@ services:
-
redis
redis
:
container_name
:
redis-${
NODE_ENV
}
container_name
:
redis-${
TAG
}
image
:
redis:5.0.0-alpine
command
:
[
"
redis-server"
,
"
--appendonly"
,
"
yes"
]
hostname
:
redis
...
...
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