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

How to set the PORT for service? #81

Closed
seven1m opened this issue Sep 24, 2015 · 3 comments
Closed

How to set the PORT for service? #81

seven1m opened this issue Sep 24, 2015 · 3 comments

Comments

@seven1m
Copy link

seven1m commented Sep 24, 2015

I'm struggling to set the PORT for the service created by the package. I've tried this in my .pkgr.yml file:

env:
  - "PORT=3000"

That seems to affect the pkgr command properly, at least according to --debug:

[2015-09-23T21:23:32-05:00] DEBUG: Found .pkgr.yml file. Updated config is now: #<Pkgr::Config name="onebody", homepage="https://church.io/onebody", description="private member portal for churches, built with Ruby on Rails", changelog="RELEASES.md", license="AGPL", version="3.5.0-pre", env=["PORT=3000"], dependencies=["mysql-server", "libxml2"], compile_cache_dir="/tmp/pkgr-cache", after_install="build/script/deb-post-install", verbose=false, debug=true, buildpacks_cache_dir="/home/tim/.pkgr/buildpacks", vendor="pkgr <https://github.com/crohr/pkgr>", architecture="x86_64", iteration="20150923212229", build_dependencies=[], auto=false, clean=true, edge=true, verify=true>

...but alas, it doesn't affect the services when I do onebody scale web=1, the created service file still has 6000:

tim@debian:~$ cat /etc/systemd/system/onebody-web-1.service
[Unit]
StopWhenUnneeded=true
Requires=onebody-web.service
After=onebody-web.service

[Service]
Environment=PORT=6000
ExecStart=/usr/bin/onebody run web
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n

[Install]
WantedBy=onebody-web.service

What am I missing?

Oh, and great software by the way! I'm super excited about using this to help our users install OneBody more easily. <3 <3 <3

@crohr
Copy link
Owner

crohr commented Sep 24, 2015

You should just need to do:

onebody config:set PORT=45678
service onebody restart

@seven1m
Copy link
Author

seven1m commented Sep 24, 2015

Ahhh ok! Don't know why I didn't think of that. Thanks!!

@seven1m seven1m closed this as completed Sep 24, 2015
@seven1m
Copy link
Author

seven1m commented Sep 24, 2015

Worked! Thanks again.

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