You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
I was playing with creating a django project template for openshift. Since --from-code doesn't accept a local git repo, I am following this workflow (as documented in the README):
# Create the django project
django-admin.py startproject -n application --template https://github.com/ekohl/django-project-openshift/archive/master.zip myproject
# Do the initial commitcd myproject
mv openshift .openshift # because startproject ignores hidden files
git init
git add .
git commit -m "Initial commit"# Create the application
rhc app create myproject python-2.7 --from-code empty --no-git
# Set the git remote & push
git remote add openshift `rhc show-app myproject | awk '/Git URL/ { print $3 }'`
git push --set-upstream openshift HEAD
Now that works, but if you use rhc git-clone it will also set the application values in .git/config for rhc app *. It would be great if --from-code /path/to/myproject works and sets the needed values. Then --no-git should not be needed either.
This should also be helpful on existing projects that move to openshift, but are not publicly accessible (as most companies prefer).
The text was updated successfully, but these errors were encountered:
Benefit of the create empty, then push workflow over create --from-code:
less likely to time out
easier to debug (build problems show up on stdout during push, rather than racing to rhc ssh 'ps auxf; tail -n +1 -f /tmp/initial-build.log' in parallel before create fails and the app gets destroyed...).
It'd also be useful to have a command like rhc git-clone that only sets up a remote (with configurable name) and/or the rhc.* git configs.
The use case is having several apps from the same code. E.g. I have both an rhcloud-staging and an rhcloud git remotes, and want git config pointed to the prod app so that rhc tail etc will access the prod one.
[My current kludge for the configs was creating with --git, then doing:
I was playing with creating a django project template for openshift. Since
--from-code
doesn't accept a local git repo, I am following this workflow (as documented in the README):Now that works, but if you use
rhc git-clone
it will also set the application values in.git/config
forrhc app *
. It would be great if--from-code /path/to/myproject
works and sets the needed values. Then --no-git should not be needed either.This should also be helpful on existing projects that move to openshift, but are not publicly accessible (as most companies prefer).
The text was updated successfully, but these errors were encountered: