techker Posted January 8, 2018 Share Posted January 8, 2018 Hey guy's have a few friends that need an admin panel to manage there clients and information So i created a script and did the panel ..but im debating on how do i share this. i created a domaine and database but if i have 3 guy's that need it for there own clients.Do i create sub domains for each and individuel databases or one database with like a RepID field in the tables to filter each login's and clients that are associated to this admin... or do i create a database for each so it can be safer and less heavy in long terme.. if so is there like a script that i can do that can create a sub domain and database and insert all the tables and files...lol or is it pushing it.. Thx Guy's Quote Link to comment https://forums.phpfreaks.com/topic/306096-advice-needed-for-site/ Share on other sites More sharing options...
requinix Posted January 8, 2018 Share Posted January 8, 2018 Well, do you want to support one application that can handle all the clients' needs, or do you want to customize and maintain multiple copies separately? One database costs more work now (adding that ID) but less work later (one codebase for everyone). Separate databases is less work now (make copies) and more work later (fix the same bug multiple times). 1 Quote Link to comment https://forums.phpfreaks.com/topic/306096-advice-needed-for-site/#findComment-1555130 Share on other sites More sharing options...
gizmola Posted January 9, 2018 Share Posted January 9, 2018 This is an extremely complicated question to answer and impossible with the minimal information you provided. While there are certainly development implications to your question, there could be an equal amount of DevOps capability required. The general term for setup and configuration of an environment or service, is called "Provisioning". Certainly you can create a series of scripts that do this for you and put an environment in a known state. There are all sorts of DevOps tools out there like Chef, Puppet, Salt and Ansible that do "orchestration" of environments and are built to handle whatever you might need. There's also Docker, which has a lot of features that could handle the isolation of separate computing environments. Typically the way this is done is that you have not only a copy of the database, but a separate copy of the code. While that is not strictly necessary, and adds to the redundancy, it also provides isolation of an environment. So you could have customizations or modules for customer A, that customer B does not have. Otherwise you will have to have some separate bootstrapping code that reads a separate environment for each person. In general, yes, one way to handle this is to have separate virtual host configurations and use a subdomain. user1.yourdomain.com user2.yourdomain.com Each user gets a different directory, with different db user/pw and database name. Doing this well, writing all the code to make it happen, and testing is all additional work, but by the same token, you will have extra code and complexity involved in every database query you have if you need to segment all your data by user. Ultimately, if this could develop into a business where you are providing "Software as a service" then it's probably better to take the DevOps approach and separate the environments, but then you have more system administration to deal with. If it's probably just going to be these 3 guys, you are probably better off just maintaining one system configuration and putting in the code that relates all the data to a specific user. 1 Quote Link to comment https://forums.phpfreaks.com/topic/306096-advice-needed-for-site/#findComment-1555150 Share on other sites More sharing options...
techker Posted January 9, 2018 Author Share Posted January 9, 2018 Thx for the reply's, ya there is a few things to see..lol i have access to all in my cpanel .i will look in to this devops tool you are talking about.looks like a good idea. thx@gizmola Quote Link to comment https://forums.phpfreaks.com/topic/306096-advice-needed-for-site/#findComment-1555186 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.