Giter VIP home page Giter VIP logo

workspace's Introduction

workspace

Dockerfile modified from laradock Main Feature

  • workspace (include nodejs and container with username : arn)
  • nginx
  • php-fpm
  • mysql
  • phpmyadmin
  • traefix
  • volume database to folder VOLUME-DATA (set in ENV for change)

*****************************************************

  • Easy switch between PHP versions: 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 5.6
  • Easy to customize any container, with simple edits to the Dockerfile.
  • All Images extend from an official base Image. (Trusted base Images).
  • Pre-configured NGINX to host any code at your root directory.
  • Can use Laradock per project, or single Laradock for all projects.
  • Everything is visible and editable.
  • Fast Images Builds.

*****************************************************

Getting Started Requirements

  • Git
  • Docker [ >= 17.12 ]

Setup for Single Project

  1. Already have a PHP project: Your folder structure should look like this:

    • project-a
    • workspace-a
    • project-b
    • workspace-b
    • cp .env.example .env
  2. Don’t have a PHP project yet:

    • workspace
    • project-z
      • cp .env.example .env
      • At the top, change the APP_CODE_PATH_HOST variable to your project path.
        • APP_CODE_PATH_HOST=../project-z/ (Make sure to replace project-z with your project folder name.)

Setup for Multiple Projects: Your folder structure should look like this:

  • workspace
  • project-1
  • project-2
- Make sure the APP_CODE_PATH_HOST variable points to parent directory.
   APP_CODE_PATH_HOST=../
- Go to your web server and create config files to point to different project directory when visiting different domains:
   For Nginx go to nginx/sites, for Apache2 apache2/sites.
   workspace by default includes some sample files for you to copy app.conf.example, laravel.conf.example and symfony.conf.example.
- change the default names *.conf:
   You can rename the config files, project folders and domains as you like, just make sure the root in the config files, is pointing to the correct project folder name.
- Add the domains to the hosts files.
   127.0.0.1  project-1.test
   127.0.0.1  project-2.test    ...
   If you use Chrome 63 or above for development, don’t use .dev. Why?. Instead use .localhost, .invalid, .test, or .example.

Run

  • docker-compose up -d nginx mysql phpmyadmin workspace

  • docker-compose exec workspace bash

      (Enter the Workspace container, to execute commands like (Artisan, Composer)
      Note: You can add --user=arn to have files created as your host’s user. Example:
      docker-compose exec --user=arn workspace bash
    
  • Update your project configuration to use the database host Open your PHP project’s .env file or whichever configuration file you are reading from, and set the database host DB_HOST to mysql: DB_HOST=mysql

workspace's People

Contributors

roni11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.