Skip to content

Latest commit

 

History

History
57 lines (28 loc) · 3.31 KB

upload_app.md

File metadata and controls

57 lines (28 loc) · 3.31 KB
copyright lastupdated
years
2015, 2017
2017-04-19

{:new_window: target="_blank"} {:shortdesc: .shortdesc}

Uploading your application

After you are logged in to {{site.data.keyword.Bluemix}}, you can upload your application with the bluemix app push command. {:shortdesc}

Before you begin, you must:

  1. Install the {{site.data.keyword.Bluemix}} command line interface.

Download {{site.data.keyword.Bluemix}} command line interface

  1. Connect to {{site.data.keyword.Bluemix}}.
bluemix api https://api.DomainName
  1. Log in to {{site.data.keyword.Bluemix_notm}}.
bluemix login -u username -o org_name -s space_name

When a bluemix app push command is issued, the command line interface provides the working directory to the {{site.data.keyword.Bluemix_notm}} environment that uses a buildpack to build and run the application.

  1. From your application directory, enter the bluemix app push command with the application name. The app name must be unique in the {{site.data.keyword.Bluemix_notm}} environment.
bluemix app push app_name -m 512m

{{site.data.keyword.Bluemix_notm}} includes built-in buildpacks. In some cases, even for the built-in buildpacks, you must also supply a -c option to specify the command that is used to start your application. For example, you need to use the -c option to push your Node.js application:

bluemix app push app_name -c start_command

In addition, the Node.js application must contain a valid package.json file.

All other external buildpacks must be pushed by using the -b option. For example:

bluemix app push app_name -b buildpack_URL

Tip: When you use the bluemix app push command, the command copies all of the files and directories from your current directory to Bluemix. Ensure that you have only the required files in your application directory.

  1. If you change your application, you can upload those changes by entering the bluemix app push command again. The command uses your previous options and your responses to the prompts to update any running instances of your application with the new bits of code.

{{site.data.keyword.Bluemix}} CLI bundled a cf cli in its installation. bluemix app push command acutually invokes cf push to upload and deploy your application to {{site.data.keyword.Bluemix_notm}}. See cf commands for more information about cf push. See Using community buildpacks for information about buildpacks.