Install 2 instances of ERPNext on same server?

已查看 398 次
跳至第一个未读帖子

CJ

未读,
2013年11月12日 23:46:022013/11/12
收件人 erpnext-dev...@googlegroups.com
Is this possible? Let's say one for SIT port 8080 and one for production port 8000 with different DB.

Maxwell Morais

未读,
2013年11月13日 06:38:182013/11/13
收件人 erpnext-dev...@googlegroups.com
P​
lease, see my configuration

gunicorn.conf for supervisor


[program:gunicorn_mxmo]
command=gunicorn -b 127.0.0.1:7999 -w 2 lib.webnotes.app:application
directory=home/apra/mxmo
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

[program:gunicorn_realize]
command=gunicorn -b 127.0.0.1:8000 -w 2 lib.webnotes.app:application
directory=/home/apra/next
user=erpnext
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

[program:gunicorn_demo]
command=gunicorn -b 127.0.0.1:8001 -w 2 lib.webnotes.app:application
directory=/home/apra/demo
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

erpnext-mxmo.conf


upstream erpnextmxmo {
​​
    server 127.0.0.1:7999 fail_timeout=0;    
}

server  {
    listen         80;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/maxwell/mxmo;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextmxmo;
    }
}

erpnext-realize.conf


upstream erpnextrealize {
    server 127.0.0.1:8000 fail_timeout=0;    
}

server  {
    listen         8080;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/maxwell/next/public;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextrealize;
    }
}

erpnext-demo.conf


upstream erpnextdemo {
    server 127.0.0.1:8001 fail_timeout=0;    
}

server  {
    listen         8081;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/apra/demo;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextdemo;
    }
}



2013/11/13 CJ <joven...@gmail.com>
Is this possible? Let's say one for SIT port 8080 and one for production port 8000 with different DB.

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Maxwell Morais
Tecnologia da Informação

CJ

未读,
2013年11月13日 10:48:002013/11/13
收件人 erpnext-dev...@googlegroups.com
Hi looks positive. What is gunicorn.conf? I cannot find this file. 


2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Maxwell Morais

未读,
2013年11月13日 11:05:362013/11/13
收件人 erpnext-dev...@googlegroups.com


2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

CJ

未读,
2013年11月13日 11:08:372013/11/13
收件人 erpnext-dev...@googlegroups.com
Thank you, I will take a look. So remove apache and use WSGI is recommended?


2013/11/13 CJ <joven...@gmail.com>


2013/11/13 CJ <joven...@gmail.com>

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--

Maxwell Morais
Tecnologia da Informação

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Maxwell Morais

未读,
2013年11月13日 11:13:512013/11/13
收件人 erpnext-dev...@googlegroups.com
Yes, the WSGI works much better in performance issues with gunicorn than Apache.


2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

CJ

未读,
2013年11月13日 11:15:002013/11/13
收件人 erpnext-dev...@googlegroups.com
If I use apache, virtualhost is something I should study and configure to do the same?

Maxwell Morais

未读,
2013年11月13日 11:21:232013/11/13
收件人 erpnext-dev...@googlegroups.com
I developed a configuration for Apache with mod_wsgi or cgi
There are some stability issues related to the response time of apache, but if you want to move on, follow the settings.


Another issue is to perform an installation on a CPanel environment, or shared-hosting, will bring you some headaches, as a means to replace memcached, some servers do not support shared, and some modifications related connections with the base data.


2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

CJ

未读,
2013年11月13日 11:38:302013/11/13
收件人 erpnext-dev...@googlegroups.com
Interesting but fun.

I can't just install 2 copy of erpnext on different directory, modify conf file to use different DB and then configure apache with example:

Server configuration

Listen 80
Listen 8080

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080

<VirtualHost 172.20.30.40:80>
ServerName www.example.com
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName www.example.com
DocumentRoot /www/domain-8080
</VirtualHost>

<VirtualHost 172.20.30.40:80>
ServerName www.example.org
DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName www.example.org
DocumentRoot /www/otherdomain-8080
</VirtualHost>


This is not enough to achieve it?

Maxwell Morais

未读,
2013年11月13日 11:47:532013/11/13
收件人 erpnext-dev...@googlegroups.com
Yes you can, my folders APP and LIB, are just links to another directory, where all files, I use a custom file conf.py and run "./lib/wnf.py --reinstall" to each new installation.






2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

CJ

未读,
2013年11月13日 11:51:082013/11/13
收件人 erpnext-dev...@googlegroups.com
Thank you, Maxwell.

Sebastian Lungu

未读,
2014年7月14日 07:30:212014/7/14
收件人 erpnext-dev...@googlegroups.com
Hi Maxwell,

We upgrade our Erpnext 3.x to 4.x, but we can't start both instances into latest release. Can someone  explain how to start 2 instance into frappe app?

Best Regards


2013/11/13 CJ <joven...@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Pratik Vyas

未读,
2014年7月14日 07:33:012014/7/14
收件人 erpnext-dev...@googlegroups.com
On Mon, Jul 14, 2014 at 5:00 PM, Sebastian Lungu <sebi....@gmail.com> wrote:
Hi Maxwell,

We upgrade our Erpnext 3.x to 4.x, but we can't start both instances into latest release. Can someone  explain how to start 2 instance into frappe app?

Best Regards

Did you remove old supervisor and nginx config and copy the new config generated in config/ dir?

Also, as you've replied under this thread, are you running two frappe benches?

Thanks,
--
Pratik
erpnext

Sebastian Lungu

未读,
2014年7月14日 07:52:382014/7/14
收件人 erpnext-dev...@googlegroups.com

Hi Pratik,

Thanks for your quick reply.

Actually, we start for testing new virtual box file of Erpnext 4.x and we create 2 sites like in documentation  (https://erpnext.com/download)
We create 2 sites with commands:

frappe site1 --install dbname1
frappe  site2 --install dbname2
Both sites structure&db's was created.

We do the fallowing steps also:
  • cp config/nginx.conf /etc/nginx/conf.d/frappe.conf
  • cp config/supervisor.conf /etc/supervisor/conf.d/frappe.conf

Both files "frappe.conf" are automatically updated by frappe, when we add a new site? Or we need to modify manually?

Thanks in advanced  
回复全部
回复作者
转发
0 个新帖子