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

production server? #1199

Closed
gentooza opened this issue Sep 5, 2016 · 5 comments
Closed

production server? #1199

gentooza opened this issue Sep 5, 2016 · 5 comments

Comments

@gentooza
Copy link
Contributor

gentooza commented Sep 5, 2016

Hi everybody, and congrats for this amazing project!

Finally I've got the app running under development mode in a vps running Debian wheezy.
I had to tweak lot's of things I'll be glad to share in other issues if it can be useful for anybody else.

And now there is no docs about setting it under production.

My question, as I almost know nothing about rails apps, is: could I get it working by following some guides like this:?

Or there is any really professional method anywhere?

Thanks a lot!

@voodoorai2000
Copy link
Member

Hello @gentooza!

Thanks for your interest in Consul.

Currently there are no production deployment docs (PRs are welcomed 😅)
Our current stack is Apache + Unicorn + Postgres + RVM + Capistrano. Nginx might be simpler to configure than Apache. Instead of those guides we recommend these ones:

Let us know how it goes or if you have any other questions!

@gentooza
Copy link
Contributor Author

gentooza commented Sep 6, 2016

great

In fact I used rvm also, so the guides I found didn't work (it seems passenger takes the 'official' (via apt-get) ruby version installed and not rvm's. giving some nice code errors in webpage)

But We don't use nginx either :-/, I'll try the guides to see what I can learn anyway.

Thanks!

@gentooza
Copy link
Contributor Author

gentooza commented Sep 8, 2016

Hi, I think I've passenger correctly configured using rvm.
I've copied the whole consul folder inside a www-data folder, and I can see consul working with my webbroswer (yujuh!)

Could you give me some hints with the changes needed in database.yml and secrets.yml to have it working in production mode?

what I did:

gem install passenger
passenger-install-apache2-module

add at the end of /etc/apache2/apache2.cnf

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
        PassengerRoot /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30
        PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
</IfModule>

and in my virtualhost configuration file:

<VirtualHost *:80>

                DocumentRoot /var/www/<my domain>/home/plaza/consul/public
                ServerName <mydomain>
                ServerAlias www.<mydomain>
                ServerAdmin webmaster@<mydomain>

                <Directory "/var/www/<mydomain>/home/plaza/consul/public
                        RailsEnv development
                        Options FollowSymLinks
                        #only for apache apache >=2.4?
                        #Require all granted
                        AllowOverride none
                        Options -MultiViews
                        Order allow,deny
                        Allow from all
                </Directory>
</virtualHost>

mydomain field is what it means :-)
and the docRoot and directory is where I've saved consul, a folder of www-data group.

thanks!

pd: the guides didn't help. (ngingx and capistrano, unicorn... :-S)

@gentooza
Copy link
Contributor Author

So, what is needed to make Consul running in production environment?
Some changes in database?
ssl?
sorry to ask again, but I'm sure we could create some more documentation about it also (as in configuration) :-D

@voodoorai2000 voodoorai2000 mentioned this issue Aug 5, 2017
32 tasks
@voodoorai2000
Copy link
Member

voodoorai2000 commented Aug 5, 2017

Closed in favor of #1778

mlovic pushed a commit to wairbut-m2c/consul that referenced this issue Jul 10, 2018
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