Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment on Heroku #3967

Closed
pjotrsavitski opened this issue May 8, 2019 · 6 comments
Closed

Deployment on Heroku #3967

pjotrsavitski opened this issue May 8, 2019 · 6 comments

Comments

@pjotrsavitski
Copy link

What problem does this feature solve?

Documentation about deployment on Heroku

What does the proposed API look like?

This script should work, though it does require heroku cli utility to be present, account being logged in and an app already existing.

This was used as a source of information on how to deploy static web: https://gist.github.com/wh1tney/2ad13aa5fbdd83f6a489

#!/usr/bin/env sh

# abort on errors
set -e

# build
npm run build

# navigate into the build output directory
cd dist

# Create  Heroku specific files for deployment
# Could also use Procfile to clearly define what should be used
echo '{}' > composer.json
echo '<?php include_once("home.html"); ?>' > index.php

git init
git add -A
git commit -m 'Deploy'

heroku git:remote --app {APP-NAME}

git push -f heroku master

cd -
@zigomir
Copy link
Contributor

zigomir commented May 10, 2019

Dunno why you included php related stuff here...anyhow, I proposed Heroku docs some time ago and it's still hanging in #3777

@pjotrsavitski
Copy link
Author

pjotrsavitski commented May 10, 2019 via email

@pjotrsavitski
Copy link
Author

I have looked at all of the proposed solutions (linked within the pull request description) and all of them look like they are using node.js to serve the static file in one way or the other. This gets the job done, yet Node is not really meant for serving static files as such. In this regard Apache httpd or hginx are clearly on the winning side with superior reliability and speed. Having PHP added into the mix does not seem like a huge downside. This include_once() is there to get the file served without the need of navigating to index.html directly. That step would not be needed if the server instance would have been preconfigured to serve the index.html along with index.php as the directory index file (that is the default behaviour for apache, if I do remember it correctly).

This guide would also be a lot like the one for GitHub pages, though requires a bit more steps and effort.

@zigomir
Copy link
Contributor

zigomir commented May 11, 2019

I don’t understand - my PR doesn’t require (other listed do, that’s why I don’t prefer them) you to run and configure node server, nor php.

@pjotrsavitski
Copy link
Author

To be honest, i did not check your solution in details (probably missing some of the basic knowledge for that matter), but it looked like a configuration for something (not sure what that something is). if it is just a standard service meant for serving static content, the all is well and sunny. If that is a configuration for some node.js based solution, then it still is alright as it is shorter, simpler and easier to get up and running. In my case, the solution was needed fast and having apache or any similar alternative seemed like a win-win situation. Do excuse my ignorance as I did not really invest much into understanding what was that configuration for. Please do share the link to docs page if that is not a huge effort. Thank you for your responses.

@sodatea
Copy link
Member

sodatea commented Aug 21, 2019

Closing as the corresponding PR has been merged.
See documentation at https://cli.vuejs.org/guide/deployment.html#heroku

@sodatea sodatea closed this as completed Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants