added docker-compose for production

This commit is contained in:
Carter 2025-04-22 11:22:02 -06:00
parent 62e3a164d9
commit b314dd76e5
4 changed files with 39 additions and 47 deletions

View file

@ -97,7 +97,7 @@ deploy:production:
- ssh -o StrictHostKeyChecking=no ${DEPLOY_TARGET}
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker stack deploy --with-registry-auth -c docker-compose.yml webui
- docker stack deploy --with-registry-auth -c docker-compose.prod.yml webui
when: manual
allow_failure: false
@ -205,7 +205,6 @@ staging:deploy:
before_script: &staging_tunnel
- "apk --update add openssh-client"
- "eval $(ssh-agent -s)"
- "echo ${#STAGING_SSH_PRIV_KEY}"
- "echo \"$STAGING_SSH_PRIV_KEY\" | tr -d '\r' | ssh-add - "
# - "ssh -Mo StrictHostKeyChecking=no -S deploy-ctrl-socket -fnNTL /var/run/docker.sock:/var/run/docker.sock ${DEPLOY_TARGET}"
# - "ssh -S deploy-ctrl-socket -O check ${DEPLOY_TARGET}"
@ -217,38 +216,6 @@ staging:deploy:
- docker stack deploy --with-registry-auth -c docker-compose.staging.yml webui
when: manual
allow_failure: false
# deploy:development:
# image: docker:20.10.21
# stage: deploy
# variables:
# DOCKER_DRIVER: overlay2
# DEPLOY_IMAGE: ${CI_REGISTRY}/brandx/bxt-app/production:development
# DOCKER_HOST: ssh://deploy@bxt-dev.adaptiveagriculture.ca
# DEPLOY_TARGET: deploy@bxt-dev.adaptiveagriculture.ca
# only:
# - dev_environment
# environment:
# name: Development
# url: https://bxt-dev.adaptiveagriculture.ca
# before_script: &dev_tunnel
# - "apk --update add openssh-client"
# - "eval $(ssh-agent -s)"
# - ssh -V
# - cat /etc/os-release
# - "echo DEPLOY_TARGET=${DEPLOY_TARGET}"
# - "echo DOCKER_HOST=${DOCKER_HOST}"
# - "echo \"$DEVELOPMENT_SSH_PRIV_KEY\" | tr -d '\r' | ssh-add - "
# # - "ssh -Mo StrictHostKeyChecking=no -S deploy-ctrl-socket -fnNTL /var/run/docker.sock:/var/run/docker.sock ${DEPLOY_TARGET}"
# # - "ssh -S deploy-ctrl-socket -O check ${DEPLOY_TARGET}"
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# - ssh -o StrictHostKeyChecking=no ${DEPLOY_TARGET}
# script:
# - docker login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
# - docker stack deploy --with-registry-auth -c docker-compose.dev.yml webui
# when: manual
# allow_failure: false
dependencies:development:
image: node:$NODE_VERSION