Paul Bochis
Paul Bochis

Reputation: 33

How to deploy Polymer 1.0 to ubuntu 14.04?

I have an ubuntu 14.04 droplet on digital ocean and i want to deploy my polymer 1.0 app(on port 80). This is my first time deploying Polymer to production(or any kind of web app for that matter).

To be noted: while developing, I did not use any build automation tool(like grunt or gulp), I just used an IDE and the simple python http server to test it locally.

Upvotes: 0

Views: 1103

Answers (2)

Pipo Viola
Pipo Viola

Reputation: 1

If you start your app with de polymer-cli PRPL script, you need to change de value of the base tag and rootPath on the main .html. The standard script its intended to be served on the root of the server. I hope this may help you (I´m not too good on english, but I try my best) See ya!

Upvotes: 0

Tanbouz
Tanbouz

Reputation: 389

Python HTTP server simply serves the polymer app as static files. A web server such as Apache or Nginx will do the same but is more appropriate for production.

  1. For a basic setup, upload the polymer app to the server. Could be placed in /var/www/example.com or the home folder /home/ubuntu/myapp for example.

  2. Install either Nginx or Apache into the server/droplet.

  3. Configure* the web server to serve the polymer app at the desired URL and port.

  4. Make sure the web server has the correct access permissions to the app folder.

  5. Reload the web server!

  6. Later on. I recommend looking into Polymer starter kit since it includes a gulp script that optimizes the app for production.


*Nginx main configuration is usually in /etc/nginx/nginx.conf and custom configs are put inside /etc/nginx/conf.d/ folder on Ubuntu 14.04. Nginx config for the polymer app can be added to either but preferably as a new myapp.conf file inside conf.d folder.

Upvotes: 1

Related Questions