Best practices for developing locally? [closed] - laravel

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
When I'm developing locally. What are the best practices before moving to a remote server?
Some practices are:
First, put your machine name (hostname command in linux/mac) in bootstrap/start.php
Copy any config file you want make changes that should apply to local environment in a folder called local (in config folder)
Do not forget to put database file or any other file that contains sensitive information in .gitignore before putting in version control.
Files that are called env.*.php will put environment variables to the environment you are in, env.local.php for example.
What I want to ask about also, is , should I put composer packages that help in development in require-dev, do you do that?

If help in development means packages you don't really need in production, then YES.
You composer.json can be in production exactly the same you have in your development environment. So all those packages you use only for development, like testing package (phpspec, phpunit, behat...), must be added to the require-dev section and can safely stay there. But you also have to remember to update and install your packages by running
composer install --no-dev
Since --dev is default in Composer: https://github.com/composer/composer/blob/1.0.0-alpha7/CHANGELOG.md#100-alpha7-2013-05-04

Related

Why is using composer for TYPO3 production deployments discouraged? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
The official documentation for deploying TYPO3 states "The composer install command should not be run on the live environment."
Why is this? As far as I know deployer - a well received deployment tool for TYPO3 - does exactly this.
TYPO3 Recommends Composer as the Main Installation method.
but its good practice to run "composer install" on your local machine (or a CI Pipline like Github Actions) then move the downloaded code to the final destination server. and i think deployer is dooing exaclty that.
this has multiple advantages:
less dependancies on the production system. (one less software there to be exploited)
possiblity to run unit tests before deployment
add additional build steps for your deployment (like compilin sass
or javascripts)
ther is no need for credentials of private repositories on the production server

Laravel Varbox fresh installation failed [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I’ve downloaded the free version of Varbox wanting to start a new project using this platform that seems to be Laravel based, but it seems that after install I don't see the specific Laravel homepage, as I'd expect from a Laravel project.
I’ve setup a git repository with the Varbox source code, but it doesn’t seem to be a working Laravel project (eg. it doesn’t have an .env file, php artisan is not accessible).
You shouldn't attempt to use Varbox as a monolithic application.
Varbox has been designed as a Composer package which you'll have to locally require in your own Laravel projects, so that means you'll need to already have a working Laravel projects on top of which to install Varbox.
please click to see what I'm talking about
Please follow the documentation (I suggest installing it in the automatic way, as it's less time consuming): https://varbox.io/docs/1.x/installation

How do I set up Deployer to sync only specified folders from localhost to production? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a localhost Laravel project I want to deploy with Deployer. Currently I do it manually using an FTP tool and only sync the app, resources folders and seems to work just fine.
I want to use Deployer or some other tool I can run from terminal to sync or upload new files to the server.
Can someone help with a recipe or advice?
Do I need rsync setup using deployer or is there a way to do it without recipe/rsync.php?
Here are the steps I want configured(for now):
connect to the server, I have ssh access and I can probably configure a key
setup the 2 3 folders I want to sync, as well as files that need to be ignored.
These seem like simple tasks but for some reason I have a hard time setting them up.
Thank you
I don't know if this questions is still pending for answer, but one alternative is using some versioning tool like git, you only watch some folders and ignore the remaining. and with the basic recipe you can deploy a github/gilab/bitbucket project.
A more in dept explanation on this topic can be found [enter link description here]here1.

Why docker is needed [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I googled and I understand , docker will create an application image with environment setup.
Consider, I have an asp.net application which is already hosted in production.
I see, I can add docker support to an existing asp.net application.
How docker can help me with this, because I have already an environment setup on server. For an asp.net application all I needed mostly is a .net framework to be installed.
Instead to install docker I could install .net framework?
May be my understanding is wrong?
Docker help in deployment. For small applications, there is no special need to have docker based deployment. If you have large application can and you to push many changes very quickly to production, then choose docker. Docker will help you have a application in creating micoservices and run in any server without bothering about dependencies.

What would you want in a self-hosted project support/information web app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
My next project will be a lightweight PHP alternative to Trac, since Trac is often confusing to install and is often a little too big or feature-rich for smaller project.
Features planned so far:
Wiki
Bug tracker
Forum(s)
Static pages (easily edited of course)
Markdown support
No code repo hosting (I consider this a feature since most people would prefer to use a 3rd party such as GitHub for the actual code hosting)
My question: if you were to use a self-hosted app for making a website about one of your open source projects, what would you want? Is there anything on that list that's missing? Would you absolutely require the ability to actually host the code repo on the site itself, or would you be ok hosting the code elsewhere (Google Code, GitHub, BitBucket), and using the site only to upload major versions?
Summary: if you were to use a self-hosted app to provide info and support for an open source project of yours, what would you want it to be like?
Redmine is my current favorite, I usually install it via BitNami

Resources