SORU
11 Mayıs 2012, Cuma


Basit bir html ve javascript dosyası bir yapı heroku yüklemek mümkün mü?

Benim açık kaynak kodlu bir proje heroku dağıtmak için çalışıyorum, zorunlu olarak sadece statik html ile çok basit ve javascript. Ama statik siteler destekliyorlar mı? Yerine hiç bir şey kullanmayı düşünmüyorsanız eğer mi Sinatra bir proje ama html ve javascript bir hale getirmek istemiyorum.

~/sites/d4-site $ heroku create --stack cedar
Creating quiet-ice-4769... done, stack is cedar
http://quiet-ice-4769.herokuapp.com/ | git@heroku.com:quiet-ice-4769.git
Git remote heroku added


~/sites/d4-site $ git remote -v
heroku  git@heroku.com:quiet-ice-4769.git (fetch)
heroku  git@heroku.com:quiet-ice-4769.git (push)


~/sites/d4-site $ git push heroku master
Counting objects: 53, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (53/53), 206.08 KiB, done.
Total 53 (delta 4), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
 !     Heroku push rejected, no Cedar-supported app detected

CEVAP
8 Temmuz 2013, PAZARTESİ


Basit bir şekilde PHP bir Uygulama olarak HTML uygulamasını taklit. Heroku düzgün PHP uygulamaları tanımlar.

  1. Home.html için index.html dosyanızı yeniden adlandırın.
  2. İndex.php bir dosya oluştur ve giriş html dosyası vardır. Eğer HTML giriş dosyanızı tavsiye olarak home.html adlandırılmışsa, index.php gibi görünmelidir:

    <?php include_once("home.html"); ?>

  3. Makinede komut satırında iterek, türü vardır:

    git add .
    git commit -m 'your commit message'
    git push heroku master

Heroku düzgün bir şekilde uygulaması şimdi php bir uygulama olarak algılamak gerekir:

-----> PHP app detected
-----> Bundling Apache version 2.2.22
-----> Bundling PHP version 5.3.10
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for PHP   -> web

-----> Compiled slug size: 9.9MB
-----> Launching... done, v3
...

Blog yazı için lemiffe için deli Teşekkürler: http://www.lemiffe.com/how-to-deploy-a-static-page-to-heroku-the-easy-way/

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • AmazonWireless

    AmazonWirele

    8 EYLÜL 2010
  • Metheud

    Metheud

    9 EYLÜL 2006
  • wafflepwn

    wafflepwn

    14 AĞUSTOS 2008