Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VoxFrontend
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
Model registry
Operate
Environments
Terraform modules
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
Disappointment industries™
VoxFrontend
Commits
9ec4b90a
Verified
Commit
9ec4b90a
authored
4 years ago
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
CI deploy mayhaps
parent
c92b95a8
No related branches found
No related tags found
No related merge requests found
Pipeline
#5578
passed
4 years ago
Stage: test
Stage: build
Stage: docker
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+18
-0
18 additions, 0 deletions
.gitlab-ci.yml
docker-compose.yml
+26
-0
26 additions, 0 deletions
docker-compose.yml
with
44 additions
and
0 deletions
.gitlab-ci.yml
+
18
−
0
View file @
9ec4b90a
...
...
@@ -4,6 +4,7 @@ stages:
-
test
-
build
-
docker
-
deploy
format
:
image
:
golang:alpine
...
...
@@ -35,3 +36,20 @@ build:
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest
deploy
:
stage
:
deploy
image
:
kroniak/ssh-client
before_script
:
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
script
:
-
ssh mike@sch.mikesweb.site "mkdir -p ~/deploy/vox"
-
scp docker-compose.yml mike@sch.mikesweb.site:~/deploy/vox/
-
ssh root@sch.mikesweb.site "cd /home/mike/deploy/vox; docker-compose up -d --remove-orphans"
only
:
-
master
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
26
−
0
View file @
9ec4b90a
version
:
"
3"
services
:
vox
:
image
:
registry.mikesweb.site/vox:latest
container_name
:
vox
restart
:
unless-stopped
environment
:
-
POSTGRES=vox_postgres
env_file
:
-
secrets.env
labels
:
-
traefik.http.services.vox.loadbalancer.server.port=8080
-
traefik.http.routers.vox.rule=Host(`vox.mikesweb.site`)
-
traefik.http.routers.vox.tls=true
-
traefik.http.routers.vox.tls.certresolver=myresolver
postgres
:
image
:
postgres:latest
container_name
:
vox_postgres
environment
:
-
POSTGRES_PASSWORD=postgres
volumes
:
-
vox_postgres:/var/lib/postgresql/data
volumes
:
vox_postgres
:
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