felixrieseberg / ember-cli-azure-deploy

:wrench: Build Ember Cli Apps on Azure Websites
MIT License
19 stars 2 forks source link

Default ember-cli app does not deploy/build correctly #2

Closed rathwell closed 9 years ago

rathwell commented 9 years ago

Sorry to keep bothering you today ;)

So, I setup a new ember-cli app with "ember new foo", then followed these steps:

  1. install ember-cli-azure-deploy
  2. create git repository at BitBucket
  3. create azure website
  4. setup git deployment on azure website, selecting the repository that was created on Bitbucket

On visiting the azure site, I get "You do not have permission to view this directory or page". I FTP'd to the site, the repo is all there under wwwroot, including a new iisnode.yml file, however, there is no dist directory and no web.config.

Have you had any luck getting this to work with the default starter ember-cli app? My gut feeling is that there are node_modules exceeding the 260 max windows filename length, and this is causing the build to fail, but I don't see a way to get those error messages.

Any ideas?

felixrieseberg commented 9 years ago

Hey,

No worries, I'm super thankful for your reports. Did you run ember-cli-azure-deloy init? If so, there should be a deploy.sh in your repo's root.

All the best, Felix


From: Mark Rathwell notifications@github.com<mailto:notifications@github.com> Sent: Saturday, March 14, 2015 13:07 Subject: [ember-cli-azure-deploy] Default ember-cli app does not deploy/build correctly (#2) To: felixrieseberg/ember-cli-azure-deploy ember-cli-azure-deploy@noreply.github.com<mailto:ember-cli-azure-deploy@noreply.github.com>

Sorry to keep bothering you today ;)

So, I setup a new ember-cli app with "ember new foo", then followed these steps:

  1. install ember-cli-azure-deploy
  2. create git repository at BitBucket
  3. create azure website
  4. setup git deployment on azure website, selecting the repository that was created on Bitbucket

On visiting the azure site, I get "You do not have permission to view this directory or page". I FTP'd to the site, the repo is all there under wwwroot, including a new iisnode.yml file, however, there is no dist directory and no web.config.

Have you had any luck getting this to work with the default starter ember-cli app? My gut feeling is that there are node_modules exceeding the 260 max windows filename length, and this is causing the build to fail, but I don't see a way to get those error messages.

Any ideas?

Reply to this email directly or view it on GitHubhttps://github.com/felixrieseberg/ember-cli-azure-deploy/issues/2.

rathwell commented 9 years ago

Yes, I ran that. I think I found the relevant log. It looks like deploy.sh is not getting run (though it is present in the Azure website's wwwroot). Below is the log:

<entries>
  <entry time="2015-03-14T20:16:48.6757988Z" id="ddb5d6b7-9eb8-4d85-8dba-1153d98f4584" type="0">
    <message>Updating submodules.</message>
  </entry>
  <entry time="2015-03-14T20:16:48.7704471Z" id="67ceec4b-f66a-417b-8386-8562130d2866" type="0">
    <message>Preparing deployment for commit id 'c5dea4ff8d'.</message>
  </entry>
  <entry time="2015-03-14T20:16:49.3334314Z" id="e3538751-a31c-4e03-b21f-c05d7009e399" type="0">
    <message>Generating deployment script.</message>
    <entry time="2015-03-14T20:16:49.4436383Z" id="a5a98ce6-ddce-4de4-8708-f219db219c1d" type="0">
      <message>Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --node --sitePath "D:\home\site\repository"').</message>
    </entry>
  </entry>
  <entry time="2015-03-14T20:16:49.5686383Z" id="437534f9-f7d0-4a19-ad8c-1147be26ccca" type="1">
    <message>Running deployment command...</message>
    <entry time="2015-03-14T20:16:49.5999321Z" id="61862905-0ece-4514-8f25-79d8d9d5bd46" type="0">
      <message>Command: "D:\home\site\deployments\tools\deploy.cmd"</message>
    </entry>
    <entry time="2015-03-14T20:16:50.0863038Z" id="15738825-287e-4d5d-8a24-17a6d0f97350" type="0">
      <message>Handling node.js deployment.</message>
    </entry>
    <entry time="2015-03-14T20:16:50.4547437Z" id="8cde127d-235e-45dd-a325-0582f405a277" type="0">
      <message>KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'</message>
    </entry>
    <entry time="2015-03-14T20:16:50.485988Z" id="d79a0aff-4112-442e-9fd6-035846561b2d" type="0">
      <message>Copying file: 'app\templates\application.hbs'</message>
    </entry>
    <entry time="2015-03-14T20:16:50.5953639Z" id="8558e77f-ba0e-4437-be26-dcd5b32a045e" type="1">
      <message>Invalid start-up command "ember server" in package.json. Please use the format "node &lt;script relative path&gt;".</message>
    </entry>
    <entry time="2015-03-14T20:16:50.6109896Z" id="51ff730b-8764-4416-9051-a3bd8bc222f8" type="0">
      <message>Looking for app.js/server.js under site root.</message>
    </entry>
    <entry time="2015-03-14T20:16:50.678038Z" id="3b05041a-01e2-4a0d-8d2e-ff57487d0a78" type="1">
      <message>Missing server.js/app.js files, web.config is not generated</message>
    </entry>
    <entry time="2015-03-14T20:16:50.678038Z" id="9f0265ed-5176-48ca-b32d-7c4e90898c73" type="0">
      <message>Node.js versions available on the platform are: 0.6.17, 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.12.0.</message>
    </entry>
    <entry time="2015-03-14T20:16:50.9280387Z" id="82da9772-8da4-4881-bbd3-60d03a726354" type="0">
      <message>Selected node.js version 0.12.0. Use package.json file to choose a different version.</message>
    </entry>
    <entry time="2015-03-14T20:16:52.2562076Z" id="e07b6b2d-5367-47c3-9082-fa3e22c51b06" type="0">
      <message>Updating iisnode.yml at D:\home\site\wwwroot\iisnode.yml</message>
    </entry>
    <entry time="2015-03-14T20:16:52.4182546Z" id="5132aba2-e1df-4bfb-8c37-d13e92920239" type="0">
      <message>Finished successfully.</message>
    </entry>
  </entry>
  <entry time="2015-03-14T20:16:52.5146866Z" id="f656f3b2-4fee-46ef-ae90-d0600fc77e3d" type="0">
    <message>Deployment successful.</message>
  </entry>
</entries>
felixrieseberg commented 9 years ago

Thanks for that... Azure should detect deploy.sh itself, but we might have to force it (and it's probably good practice anyway). I'll add this to the main codebase, but you can force Azure yourself by adding a .deployment file to root with the following content:

[config] command = bash deploy.sh

rathwell commented 9 years ago

That's the one ;) Thanks a lot.