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

Tasks to support Phoenix 1.3 (phx) #57

Open
loongmxbt opened this issue Jul 26, 2017 · 1 comment
Open

Tasks to support Phoenix 1.3 (phx) #57

loongmxbt opened this issue Jul 26, 2017 · 1 comment

Comments

@loongmxbt
Copy link

In tasks the command such as mix phoenix.digest is for Phoenix 1.2.
I think it's time to add support for 1.3 version.

  1. A new branch for 1.3 phx command (can 1.2 and 1.3 deploy together in same machine?)
  2. Master branch, gatling check the project (mix file?) and choose the version of command
  3. Master branch, gatling check an environment file and choose the version of command
    I current think 2 may be the solution.
@fuchsberger
Copy link

fuchsberger commented Sep 11, 2017

Here are some of the things that require changes:
you have to change the npm directory in deploy.exs and upgrade.exs:

    bash("npm", ~w[install], cd: env.build_dir <> "/assets")
    bash("npm", ~w[run deploy], cd: env.build_dir <> "/assets")

Further, I noticed that the mix dependencies are not forwarded to distillery. I had to copy them manually to rel/config.exs:

  set applications: [
    :phoenix,
    :phoenix_pubsub,
    :phoenix_html,
    :cowboy,
    :gettext,
    :phoenix_ecto,
    :postgrex,
    :comeonin,
    :distillery,
    :runtime_tools
  ]

I am using a custom nginx configuration (because i am behind a proxy) so I am not entirely sure if this would need a change as well. in any case here is my nginx configuration:

# Boilerplate
# after making changes, restart nginx: sudo nginx -s reload
server {
  listen 80;
  server_name domain.com 192.168.30.103;

  location / {
    proxy_pass http://127.0.0.1:54747;       # Port 54747 is the port gatling assigned to the app
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_set_header Origin '';
  }
}

EDIT: Following the steps above I was able to deploy my phoenix app. However the service is failing (i assume port variable doesn't get forwarded). At this point running the server outside a service is working fine but the obvious goal would be to run it in a service,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants