Fast & Easy Docker Container For Local WordPress Development

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 74

  •  4 года назад +40

    Nice to see other people use my repo! Now this repo is using .env files so you don't need to manually update the scripts. Also docker-compose will read the env values.

    • @lostTourist1
      @lostTourist1 4 года назад

      Thanks! working on setting it up now

    • @freeace00
      @freeace00 3 года назад +2

      @@lostTourist1 Thanks!!
      It runs well. But the domain ( myapp.local ) doesn't work. Do I miss anything or do I need to do something for the ".local" before we use ur repo way?

    • @rickarddeman6560
      @rickarddeman6560 3 года назад +1

      @@freeace00 It is same for me. First of all the nginx doesn't start and I think that is due to php admin and nginx port conflict, default had both at 80 and when I switched to 81 I can start. However, neither with 80 or 81 when I open myapp I can't connect, there is nothing no installation. Did you solve it? :)

  • @davedurkee8853
    @davedurkee8853 4 года назад +5

    May 1, 2020: I have this up and running on my macbook. The repo has probably been updated since you recorded this tutorial. The files now use environment variables. No need to do the search and replace (myapp to mytest). There are 2 .env files, (one in the root and the other in /src) to be edited. I also had to update compose on my mac from 7.1 to 7.2. It took me an hour to go through your 11 minute tutorial. I have some experience with docker and docker-compose. I have very little knowledge of Wordpress. before I noticed the /src .env file was missing I could log on to phpmyadmin and the localhost said 'error establishing a database connection'. Thank you! I appreciate the time you spent to make the video.

    • @OdotJdot
      @OdotJdot 4 года назад

      Im having the same problem.

    • @oflanagain
      @oflanagain 4 года назад

      Yea not having enough experience I'm not going to waste time with this. Pity AY doesn't respond or why on earth he didn't just copy the files to his own repo in case of changes by the original author which don't line up with this video. Kinda stuffs it for those folk who really need it.

    • @WPCasts
      @WPCasts  4 года назад

      @@oflanagain Hindsight is 20/20 on this one. I should have copied the files to my own repo. I'll be doing a new Docker video in the future and will follow this advice. Thanks for the feedback!

    • @robertbender4018
      @robertbender4018 4 года назад

      The main .env file located on the same level as the docker-compose.yml file need to be updated from the second .env file in the src folder:
      After the main .env file is updated, edit the mysql section on the docker-compose.yml file:
      environment:
      - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASSWORD}
      - MYSQL_DATABASE=${DB_NAME}

  • @alexdang97
    @alexdang97 4 года назад +1

    In the Modern Web Development, docker is really useful. Thanks Guy.

  • @kubakorecki
    @kubakorecki 4 года назад +8

    Why do we need ssl certificate for local development?

    • @fahadus
      @fahadus 4 года назад +4

      You'll probably need them to test integrations with payment systems etc.

  • @stanislavsapozhnikov8196
    @stanislavsapozhnikov8196 4 года назад

    when i compare Bitnami Wordpress stack and this solution on my very old proc. AMD Athlon X2 220 - real fastest speed local docker!
    Thanks Alex!

  • @bhanukrsingh
    @bhanukrsingh 5 лет назад +1

    Really excited about your WordPress course. Love your videos man.. 💪✌️

    • @WPCasts
      @WPCasts  5 лет назад +1

      Thanks, I appreciate that! I am excited about it too!

    • @maxkirwin1474
      @maxkirwin1474 5 лет назад

      @@WPCasts can't wait for the course!

  • @maZec31
    @maZec31 2 года назад

    Hello! Can you do 2022 update it is different than 3 years ago.

  • @soldadopreciso
    @soldadopreciso 2 года назад

    Interesting, More tutorials using podman , podman play kube, and how to crete a wp-cli container with the current wordpress container environment.

  • @timberwolves2380
    @timberwolves2380 4 года назад +1

    is there a way to to create a link to a live version of the dev version to show to client? like with Flywheel?

  • @karanpatil706
    @karanpatil706 3 года назад

    Hi please make video how to install WordPress using aws ecs service

  • @MobiusCoin
    @MobiusCoin 4 года назад

    Can you do a video on how to deploy using this method like the one you did with Trellis?

  • @nazim848
    @nazim848 2 года назад

    Hey Alex, really great and video.
    As there are lots of development options. According to you, what is the best WordPress development environment?
    Looking forward to hearing from you.

  • @gondronkstudio8923
    @gondronkstudio8923 4 года назад +1

    So if you work on local now then you need to deploy it, do you have video for that tutorial how to free server like netlify or others to make portfolio?

    • @lostTourist1
      @lostTourist1 4 года назад

      I would be interested in deployment as well

  • @yohannesephrem9096
    @yohannesephrem9096 3 года назад

    Great that this git project has SSL baked into it. My question do they also have a Linux version???

  • @benmarles9495
    @benmarles9495 4 года назад

    Great Vid! Not sure if you are still replying to comments on here? I would like to set this up without using Roots/Bedrock and composer. Essentially keeping everything the same but Installing wp as standard in /web and without using composer?

  • @alperenozkan
    @alperenozkan 4 года назад

    Hi Alex, we are coming to end of 2020 and still there are no courses on wpcasts.tv :(

  • @G15-n3u
    @G15-n3u 4 года назад +3

    I type cd cli
    ./create-cert.sh Then nothing happens ?

    • @samschoenberg1281
      @samschoenberg1281 4 года назад

      You need to add .env to the main directory of your application. From there you can run all the following commands starting at 6:31

  • @techmystressaway4857
    @techmystressaway4857 5 лет назад

    very useful thanks Alex

  • @ezswan
    @ezswan 4 года назад

    so for docker, does the host OS being different than remote server matter? docker is still slightly confusing to me

  • @piotrkrzewski772
    @piotrkrzewski772 3 года назад

    Yes. Docker is useful but got some errors under win10. I give up for now. But your video is good. I sub. Thanks for good job

  • @pahuana
    @pahuana 5 лет назад

    This is very useful info! Thanks a lot

    • @WPCasts
      @WPCasts  5 лет назад +1

      You are super welcome! I’m glad you found it useful :)

    • @pahuana
      @pahuana 5 лет назад

      ​@@WPCasts You have a very interesting approach to the WP subject in general and all the stuff that helps us to be a more modern WP developers.

  • @ShashankNaithani
    @ShashankNaithani 4 года назад

    Hello Sir, thankyou for the useful video. I just setup wordpress inside docker. However now I want to add webpack as another container. can you please help me how to add webpack config in yaml file

  • @Pavitramehta4
    @Pavitramehta4 3 года назад

    How can we manage this with CI/CD?

  •  3 года назад

    Hi, Thanks for the tutorial! I'm just wondering, are there any advantages to using this when comparing to Local by Flywheel?

  • @chrislo2401
    @chrislo2401 5 лет назад +1

    Hey Alex, really enjoying your videos, thanks. How does using Docker compare with using Local by Flywheel? Any advantages/disadvantages?

    • @WPCasts
      @WPCasts  5 лет назад +5

      LBF's has 2 advantages over Docker:
      1. Much easier to use
      2. Can integrate directly with their hosting services
      However, I think Docker is useful because you can customize literally anything about it. So if you want Redis, you can install Redis. If you want to use Elasticsearch, you can install Elasticsearch. You don't have to have a hosting company that supports it, you just need to update your Docker container. Speaking of hosting, you can also host a Docker container on Digital Ocean for about $5.00/mo.

    • @chrislo2401
      @chrislo2401 5 лет назад

      WPCasts Cool thanks.

    • @birdbrainsolutions6112
      @birdbrainsolutions6112 4 года назад +1

      @@WPCasts Whats the advantage of using docker for wordpress sites on digitalocean? thanks!

    • @mjscpr
      @mjscpr 4 года назад

      @@birdbrainsolutions6112 I am curious as well.

  • @garveziukas
    @garveziukas 3 года назад

    mkcert command not found after installing openssl, has anyone faced this issue?

    • @garveziukas
      @garveziukas 3 года назад

      nvm just gotta install mkcert by running brew install mkcert

  • @jed23ify
    @jed23ify 4 года назад

    @WPCasts I can not find a single video about running an EXISTING Wordpress project locally. Mostly all the tutorial videos out there end up showing how to run a NEW Wordpress project locally, I have found that 'Local by Flywheel' has some options to migrate a project locally, but you have to pay, unless its a barebones site, then it's free. Can anyone point me to the right direction of a tutorial to run an existing Wordpress project locally. Many Thanks in advance.

    • @christiansaborio410
      @christiansaborio410 4 года назад

      Create a new wordpress site, import existing wordpress site using Updraft Plus. Done.

  • @belaouraabdelwahab
    @belaouraabdelwahab 5 лет назад

    It was so much needed

  • @freeace00
    @freeace00 3 года назад

    if u r using M1 Mac, proxy is not supported yet. ( docs.docker.com/docker-for-mac/apple-m1/ ). So myapp.local ( dev domain ) might not be working.

  • @aldopineda9987
    @aldopineda9987 4 года назад

    Hi! I have a question, What is the best hosting for you? I want to chance my websites because my actual server is pretty slow. I've been researching what the best option (Patheon, Liquid Web, WPEngine, etc) But these are very expensive options. Digital Ocean is a good option?

    • @WPCasts
      @WPCasts  4 года назад +1

      Digital Ocean is great if you are comfortable managing servers. Since you're managing the server, it's significantly cheaper. So I generally use it on simple/smaller projects.
      For larger projects, I suggest Kinsta. They have really great support and are really knowledgeable about WP in general. They aren't cheap, but you get what you pay for.

    • @aldopineda9987
      @aldopineda9987 4 года назад

      @@WPCasts super, thanks!! I'm waiting for your courses. I hope they'll be available soon. Greetings!

    • @davedurkee8853
      @davedurkee8853 4 года назад

      Aldo Pineda I’m using racknerd. They have a special for about $30 a year. my.racknerd.com/aff.php?aff=835

    • @davedurkee8853
      @davedurkee8853 4 года назад

      Aldo Pineda You will need some Linux experience with setting up remote servers from scratch to use Racknerd.

  • @KamaleshwarMorjal
    @KamaleshwarMorjal 4 года назад

    Thank you so much for this video, Alex. This has really helped me fill a lot of holes in my understanding.
    I am still a bit stuck. Trying to set this up on a fresh Ubuntu Bionic machine which doesn't even have php installed, will I require to have a specific version of php (or is it php-cli) for this to work? (Bionic comes with a php-cli v7.2 in its repos as far as i can see). Any help greatly appreciated 🙏

    • @KamaleshwarMorjal
      @KamaleshwarMorjal 4 года назад

      An addition to the above would be the consideration that i was hoping to have the entire setup including php containerised. If that make sense at all, i don't know.

  • @alain1488
    @alain1488 3 года назад +1

    You should use a. Env file instead of changing it everywhere

  • @lukasluftlaufer1093
    @lukasluftlaufer1093 4 года назад

    But why not just use local by flywheel? What's the benefit here? In Local I could achieve the same in fewer clicks. Or what am I not seeing?

  • @WPCasts
    @WPCasts  5 лет назад +4

    The container described in this video has been updated, so some of the information is no longer valid. I'll release an updated Docker/WordPress video in the future.

  • @StanleyBateswar
    @StanleyBateswar 4 года назад

    When I want to create sh it says: ./create-cert.sh: line 11: ../.env: No such file or directory

    • @dnikolai
      @dnikolai 4 года назад

      This may be a bit late, but I also got this issue.
      I just removed .example from the .env file and then ran ./create-cert.sh and it worked.

    • @AntonioOrtizOrtega
      @AntonioOrtizOrtega 4 года назад

      @@dnikolai I removed it but didn't work for me. Any other solution?

  • @adamdurrant
    @adamdurrant Год назад

    I can't get this to work for the life of me, it's so confusing

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 5 лет назад

    Thanks

    • @WPCasts
      @WPCasts  5 лет назад

      You are welcome!

  • @KamunyuNitram
    @KamunyuNitram 4 года назад +1

    Looks like the tutorial is out of date, 😒😢

  • @andreir8960
    @andreir8960 4 года назад

    Спасибо братан, все работает

  • @perfect.stealth
    @perfect.stealth 4 года назад +1

    Such a clumsy and needlessly advanced process.

  • @simeonovs4443
    @simeonovs4443 Год назад

    outdated....