Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
Doorcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guardians of the Kretschmar Elock System
Doorcode
Commits
f23b6a20
Commit
f23b6a20
authored
Dec 15, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix zerodowntime deployments?
parent
9505f483
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
78 deletions
+7
-78
.gitlab-ci.yml
.gitlab-ci.yml
+2
-69
docker-compose.prod.yml
docker-compose.prod.yml
+3
-9
src/backend/.gitignore
src/backend/.gitignore
+2
-0
No files found.
.gitlab-ci.yml
View file @
f23b6a20
...
...
@@ -106,16 +106,14 @@ deploy application:
-
docker build --build-arg APP_IMAGE=$DOORCODE_IMAGE_NAME -t $NGINX_IMAGE_NAME -f nginx.Dockerfile .
-
docker stack deploy -c docker-compose.prod.yml doorcode --prune
# Give it some time to spin up...
-
sleep
3
0
-
sleep
6
0
# Make sure app is running
-
"
curl
--fail
--insecure
--silent
--location
https://${DEPLOY_ADDRESS}/api"
# API docs currently are not working
# - "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api/docs"
-
"
curl
--fail
--insecure
--silent
--location
https://${DEPLOY_ADDRESS}/api/docs"
environment
:
name
:
production
url
:
https://elock.cs.wallawalla.edu/api
on_stop
:
stop-prod
# when: manual
only
:
-
master
...
...
@@ -129,68 +127,3 @@ stop-prod:
environment
:
name
:
production
action
:
stop
#deploy_backend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# - SSH_COMMAND_STRING="cd doorcode"
# # get newest changes
# - SSH_COMMAND_STRING+=" && git pull"
# - SSH_COMMAND_STRING+=" && (docker-compose restart || docker-compose up -d)"
# # the -T fixes the input device is not a TTY .. see https://github.com/docker/compose/issues/5696
# - SSH_COMMAND_STRING+=" && docker-compose exec -T api ./update-prod.sh"
# - echo "$SSH_COMMAND_STRING"
# # Execute the deploy
# - ssh $SSH_USER@$SSH_HOST "${SSH_COMMAND_STRING}"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api | grep \"Welcome to the elock API.\""
# environment:
# name: production_api
# url: https://elock.cs.wallawalla.edu/api
# when: manual
# only:
# - master
#
#deploy_api_docs:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/backend/public/docs $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/backend/public/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api/docs/ | grep \"Welcome to the generated API reference.\""
# environment:
# name: production_api_docs
# url: https://elock.cs.wallawalla.edu/api/docs/
# when: manual
# only:
# - master
#deploy_frontend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/frontend/dist $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/frontend/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST} | grep \"work properly without JavaScript enabled.\""
# environment:
# name: production_frontend
# url: https://elock.cs.wallawalla.edu
# when: manual
# only:
# - master
docker-compose.prod.yml
View file @
f23b6a20
...
...
@@ -49,15 +49,9 @@ services:
-
wwu_webserver_key
-
wwu_root_cert
ports
:
-
target
:
4433
published
:
4433
mode
:
host
-
target
:
443
published
:
443
mode
:
host
-
target
:
80
published
:
80
mode
:
host
-
'
4443:4443'
-
'
443:443'
-
'
80:80'
volumes
:
-
$PROJ_DIR/simple-saml/cert:/var/simplesamlphp/cert:ro
-
$PROJ_DIR/simple-saml/config:/var/simplesamlphp/config:ro
...
...
src/backend/.gitignore
View file @
f23b6a20
...
...
@@ -15,3 +15,5 @@ yarn-error.log
cov/
public/docs
resources/docs
public/css/app.css
public/js/app.js
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment