Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
docker-deploy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ASTRON Templates
tools and automation
docker-deploy
Commits
cd25eee4
Commit
cd25eee4
authored
2 years ago
by
Fanna Lautenbach
Browse files
Options
Downloads
Patches
Plain Diff
copy-paste oops
parent
72e77819
No related branches found
No related tags found
1 merge request
!1
Fix & update deploy template
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
template.gitlab-ci.yml
+5
-3
5 additions, 3 deletions
template.gitlab-ci.yml
with
5 additions
and
3 deletions
template.gitlab-ci.yml
+
5
−
3
View file @
cd25eee4
...
@@ -42,11 +42,13 @@ docker-build:
...
@@ -42,11 +42,13 @@ docker-build:
EOF
EOF
script
:
script
:
-
rsync -avz docker-compose.yml $DEPLOY_HOST:$SERVICE_DIR
-
rsync -avz docker-compose.yml $DEPLOY_HOST:$SERVICE_DIR
-
rsync -avz
grafana-resources
$DEPLOY_HOST:$SERVICE_DIR
-
rsync -avz
$DOT_ENV
$DEPLOY_HOST:$SERVICE_DIR
/.env
-
|
-
|
ssh $DEPLOY_HOST -C \
ssh $DEPLOY_HOST -C \
"cd $SERVICE_DIR &&\
"cd $SERVICE_DIR &&\
docker-compose up -d"
chmod 600 $SERVICE_DIR/.env &&\
docker pull $CI_REGISTRY_IMAGE${DOCKER_IMAGE_TAG} &&\
docker-compose up -d --force-recreate"
-
echo "Application successfully deployed."
-
echo "Application successfully deployed."
when
:
manual
when
:
manual
...
@@ -57,4 +59,4 @@ deploy-to-your-host:
...
@@ -57,4 +59,4 @@ deploy-to-your-host:
DEPLOY_USER
:
$DEPLOY_USER
DEPLOY_USER
:
$DEPLOY_USER
DEPLOY_HOST
:
$DEPLOY_HOST
DEPLOY_HOST
:
$DEPLOY_HOST
SERVICE_DIR
:
$SERVICE_DIR
SERVICE_DIR
:
$SERVICE_DIR
$DOT_ENV
:
$$DOT_ENV
DOT_ENV
:
$DOT_ENV
\ No newline at end of file
\ No newline at end of file
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