Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy to remote instance #6

Closed
fliespl opened this issue Apr 8, 2023 · 4 comments
Closed

How to deploy to remote instance #6

fliespl opened this issue Apr 8, 2023 · 4 comments

Comments

@fliespl
Copy link

fliespl commented Apr 8, 2023

My deploy command:

docker-compose -H "ssh://owadmin@${DEPLOY_HOST}" --profile app -f docker-compose.yml -f docker-compose.deploy.yml -f docker-compose.${BUILD_ENV}.yml up -d --remove-orphans

Is it possible to do it here? (-H option).

@Wowu
Copy link
Owner

Wowu commented Apr 10, 2023

Setting the DOCKER_HOST environment variable should work.

@Wowu
Copy link
Owner

Wowu commented Apr 10, 2023

Same thing goes for --profile flag, use COMPOSE_PROFILES env instead.

https://docs.docker.com/compose/environment-variables/envvars/#compose_profiles

@fliespl
Copy link
Author

fliespl commented Apr 10, 2023

Thank you - will give it a try :) (probably gonna conflict with gitlab ci which also utilizes this variable).

@fliespl fliespl closed this as completed Apr 10, 2023
@Wowu
Copy link
Owner

Wowu commented Apr 11, 2023

You can do it this way to avoid the conflict:

env DOCKER_HOST="ssh://owadmin@${DEPLOY_HOST}" docker-compose -f docker-compose.yml ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants