TeroKeso/web-development

★ 0Forks 0GitHub ↗Compare

README

Web Development Docker Container

How to set it up

  1. Open PowerShell
  2. Switch to WSL (Linux environment) by typing: wsl
  3. Go to the home directory: cd ~
  4. Create a directory for the containers if there isn't one: mkdir docker-containers
  5. Move to the created directory: cd docker-containers
  6. Let's clone the git: git clone https://github.com/TommiHAMK/web-development.git
  7. Web-development directory is created. Go there: cd web-development
  8. Edit the .env file and set the MySQL password. MySQL username is root. Edit file: nano .env , ctrl + x to exit.
  9. Start Docker: docker compose up -d

That's it! Now if you open Docker Desktop you should see the container.

Some important stuff

  • Running Linux (WSL) on Windows affects how files are created and edited
    • Install "Dev Containers" VSC extension. It makes easier to edit files with VSC.
    • How create a php or any text file? With PowerShell, navigate to web-development folder and type: code . (Visual Studio Code opens). Now you can create and edit files using VSC.
    • You can copy images using Windows Explorer and even edit them using Photoshop or such.
    • The path to web-development directory is Linux\Ubuntu\home\<username>\docker-containers\web-development\
  • Create your PHP & HTML files to public_html folder
  • Wordpress is located in wordpress folder
  • Username and password for Wordpress will be set during the installation process (open localhost:8080)
  • MySQL username is root.
  • Webroot: localhost:81
  • phpMyAdmin: localhost:82
  • Wordpress: localhost:8080
  • If you use MySQL database in your PHP files, the address/host is just db

What's included

  • PHP
  • MySQL
  • phpMyAdmin
  • Wordpress

Contributors

TommiHAMKaatosmedia

Issues