1

I have just installed the command line tool for appfog and logged in, in the instructions it says run af update app Now I am trying to setup [anchorcms][1] do I run af update anchor (when I am in the anchor directory or in its parent directory) because when I do so I get the following error. Also one of the first getting started commands is target [url] do I run that with the square brackets? Also do I write af before that, and do I put my app fog url inside the square brackets.

If at all, you could help me through the steps of deploying anchorcms to appfog, that would be amazing.

Error (JSON 404): Not Found

The output i get for af apps

Anderss-MacBook-Pro:anchor anderskitson$ af apps

+-------------+----+---------+---------------------------+----------+--------+
| Application | #  | Health  | URLS                      | Services | In     |
+-------------+----+---------+---------------------------+----------+--------+
| anchortuts  | 1  | RUNNING | anchortuts.ap01.aws.af.cm |          | ap-aws |
+-------------+----+---------+---------------------------+----------+--------+


  [1]: http://anchorcms.com/
Cool Guy Yo
  • 5,910
  • 14
  • 59
  • 89

2 Answers2

1

No do not run the command with square brackets.

You only need to set the target once to https://api.appfog.com

af target https://api.appfog.com

Then login with"

af login email@example.com

The first time an app is uploaded to AppFog you use the push command. From then on you use the update command.

Example:

From the app's root folder create a new AppFog app named mycmsapp. The command will lead you through a set of questions.

af push mycmsapp

Later when you have made changes to your app and are ready to publish them:

af update mycmsapp
Tim Santeford
  • 27,385
  • 16
  • 74
  • 101
  • Do I set my target to my subdomain I created or to api.appfog.com? – Cool Guy Yo Feb 19 '13 at 18:14
  • Target is set to only https://api.appfog.com. The target is what the af tool uses to talk to AppFog. It does not relate to your app. Set it only once and forget it. – Tim Santeford Feb 19 '13 at 21:38
  • Ok I followed your instructions and used push mycms app inside of my anchor folder at this link http://anchorcms.hp.af.cm/ I am getting a 404 not found. – Cool Guy Yo Feb 19 '13 at 21:53
  • try running `af apps` to make sure that domain is mapped to your app and the app is running. – Tim Santeford Feb 20 '13 at 00:12
0

The af CLI tool doesn't make this very clear, but the af target command is only used for setting the API URL.

If you want to use a custom domain for your app, you need to use the af map <app name> appurl.com command.

In this situation:

+-------------+----+---------+---------------------------+----------+--------+
| Application | #  | Health  | URLS                      | Services | In     |
+-------------+----+---------+---------------------------+----------+--------+
| anchortuts  | 1  | RUNNING | anchortuts.ap01.aws.af.cm |          | ap-aws |
+-------------+----+---------+---------------------------+----------+--------+

You would run this command to set a target URL:

af map anchortuts www.anchortuts.com

You will need to update the DNS for your domain to add a CNAME record pointing to cname01.ap01.aws.af.cm. This value will change according to which infrastructure you're using. The full details are available in the AppFog documentation for custom domain names.

You may also use the AppFog web console for mapping your domains.

Kirk Beard
  • 9,569
  • 12
  • 43
  • 47