Using Docker for Drupal Dev (Local) - drupal

So, to put it simply, I have a drupal site that's live.
I want to work on it locally and use docker containers to manage that.
I want to use this Image:
https://index.docker.io/u/bnchdrff/nginx-php5-drupal/
And use this as my data container:
https://index.docker.io/u/bnchdrff/mariadb/
I have the database downloaded from the live site saved as an .sql file.
I need to be able to use this pre-existing database.
Best case scenario is to be able to run the images in terminal and open a browser, navigate to something like 'localhost' and have the Drupal site pop up there for me to work on.
I am running Ubuntu 13.10 and have the latest version of Docker. Needless to say I have been working on trying to get this working for a while but don't want to complicate things with my failed attempts. Any and all suggestions welcomed.

Related

ACORE API, assistance with errors and deployment

I'm having trouble with setting up ACORE API's and then having them work on a website.
Background:
Azerothcore running 3.3.5 on a debian standalone server, this has the Database, Core files and runs both the world and auth server basically a standard setup that is shown in the how-to wiki.
I also have a standalone web server, on the same subnet, but it's a separate server running linux and normal web server stuff, this has a wordpress installation with azerothcore plugin for user signup etc.
I'm trying to add the player map (https://github.com/azerothcore/playermap) and the ACORE-API set of functions (server status, arenastats, BG que and wow statistics) (https://github.com/azerothcore/acore-api)
Problem:
I understand the acore-api must be run in a container (docker or whatever) on the server, which I have done and it binds to port 3000, I can then go to the local ip:3000 and it brings up this error. (all db's etc are connecting and soap is working)
error 404 when navigating to IP:3000
I do get a few errors when running NPM install seen here: I'm not sure if they would be causing any issues or not.
screenshot of NPM errors on install
But further that, when I put say 'serverstatus' on the webserver (separate server) and configure the config.ts file I can't seem to get anything to display.
I'm not sure what I'm doing wrong but is the same scenario for all of the different functions for the acore-api
How are these meant to be installed and function? I feel I'm missing a vital step.
Likewise, with PLAYERMAP I have edited the comm_conf.php and set the realmd_id, but when loading the page, I do get the map, but the uptime is missing and no players are shown?
Could someone assist if possible?
Seems like an issue with NodeJS version. Update your NodeJS to latest LTS version 16.13.0 (https://nodejs.org)

I am unable to vagrant up

I am using a file from GitHub
It has a vagrant file with it. When I run vagrant up command in my terminal, I get an error.
The terminal should show READ ABOVE message when successful download
I want to type in the address to the site on my browser to start a local development server.
Its pretty old file and the repo was using puphpet but this project seems dead for 2 years, the website is down.
In your case, vagrant is trying to download the box from internet but the owner of this box hosted it under the puphpet domain not available anymore
I am not sure what's the best way to help now:
find another more recent example and start from there
if you want to fix this, you will need https://github.com/LearnWebCode/vagrant-lamp/blob/master/puphpet/config.yaml#L6 and use a different box available on vagrant site, ubuntu 16.04 is pretty old now but you can search one from vagrant box

How to see what web server is running on my mac?

I'm trying to learn how to create a custom WordPress theme. I've been following a tutorial, and I was trying to install DesktopServer onto my MacBook Pro (to create a local environment.)
But I'm not able to install it because it's stating that
"It appears that you have another web server already running. DesktopServer cannot be installed. Check that you do not have Web Sharing turned on from your System Preference -> Sharing control panel or turn off and remove your other web server."
I've checked my Sharing settings, and nothing is enabled (including internet sharing.) So that must mean I have a web server already running. But I don't know what that would be.
Is there a way for me to find out what web server my mac is running?
And after that, is there a way for me to disable that so I could possibly use DesktopServer instead.
I've really good with writing HTML, CSS, Javascript, etc., but I'm pretty new to the server and hosting and stuff. I honestly don't understand everything yet.
I had the same problem, and the solution that worked for me was here:
https://zachgoll.github.io/blog/2018/serverpress-error/
By default, Mac OSX has an Apache server running in the background
which conflicts with Serverpress by default.
To turn it off, run sudo apachectl stop.

Symfony / Sylius site on Vagrant / Puphpet is slow. Same site not on a Virtualbox is not slow

We have one particular site that is Symfony and uses the e-commerce bundle Sylius.
Our developers are trying to use Vagrant so we can have similar dev environments. We use Puphpet to generate the Vagrant instance and share the config file.
If we are working on the site/repo natively or on a staging server, all runs fine. Pages load in around 2-3 seconds.
When we are using Vagrant / Virtualbox, it's 30-35 seconds per page load.
So far we've tried
Allocating up to 6GB to the box
Giving up to 4 processors to the box
Turning on NFS for file sync
Turning off all other programs on computers running Vagrant / Virtualbox (chat, other browsers, etc)
None of those things made an impact on page load time.
I can provide 2 things. One is the load trace from Symfony: https://nimbus.everhelper.me/client/notes/share/708707/mvw707mckzm2wq4rlkzc
Since there is so much code to the puphpet config, I put it in a pastebin here: http://pastebin.com/7ciVA5FL
What is OS on a host machine?
My guess would be that file system is slow. Try to run an app outside of shared folder on the guest machine. If it will be fast, then you'll spot a problem at least.
NFS on *nix or mac should be fast enough, are you sure you've succeed to turn it on?
I had this pain once, and finally started to use unison instead of native vagrant's file sharing system (https://www.cis.upenn.edu/~bcpierce/unison/)
Have your tried:
http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html
or http://jeremybarthe.com/2015/02/02/speed-up-vagrant-environment-symfony2/
I think the first one is already included in Sylius, but not sure.
Also, dynamic image resize/crop may be reading/writing in the host file system and maybe there's a way to also change that (using symlinks or similar)?
vagrant-winnfsd works fine for me for getting NFS to work on Windows.

WordPress project setup - Trellis, Valet or Docker?

I want to start a new WordPress project with another developer. The decisions we made are:
We want to use Bedrock as the WP structure
we want to use Sage as the WP theme
We put the project in a GIT repository
I now ask myself if we should use Trellis, Valet or Docker.
My personal opinion is that Trellis / Docker is a bit too much for a project with two developers working on it. Additionally my experience with Vagrant is not very positive, as it was very slow when I used it. My favorite would be Valet, because it's so slim. The repository I would use is Beanstalk, from there I would trigger my deployments to my test and live system.
Additionally I am not 100% sure if my server to which I want deploy my project also needs Docker installed - does anybody knows that? And what happens when my server runs on Apache and not Nginx?
Now that Docker has native Mac and Windows apps you wouldn't need Vagrant for local dev, and running a series of Docker containers is much faster than a full-fledged VM with Vagrant+VirtualBox. Right now I have MariaDB + PHP-FPM + Nginx + WordPress + PHPMyAdmin, and the whole thing is really fast relative to my previous experience with Vagrant. Faster as in: faster initial install, faster to start/stop, faster to make changes and have them reflected after a restart. I just replaced MySQL with MariaDB in a matter of minutes (mostly fumbling with having the proper syntax in my docker-compose file).
The beauty of Docker appears precisely when you want to switch components (say Apache vs. Nginx). In WordPress' case, they provide images on Docker Hub that either include Apache or PHP-FPM (in the latter case you just add a Nginx container to your stack).
That said I just got started with Docker and there are some kinks to figure out, but it's worth figuring out.
I haven't deployed with Docker yet but I plan to test that next once I've got local dev fully working as intended. It's optional though, you could always deploy with Git webhooks or whatever you were using up to now.

Resources