Code Monkey home page Code Monkey logo

docker-eshop-sdk's Introduction

Development base

Docker based local environment that can be combined with https://github.com/OXID-eSales/docker-eshop-sdk-recipes for OXID eShop development.

Php and Npm users are synced with the current user so we will have all the rights to modify and access the content generated by using container commands.

What we have here

For the start:

  • Apache 2.4 (based on original httpd:2.4-alpine container)
  • PHP 7.4 / 8.0 / 8.1 fpm (based on oxidesales/oxideshop-docker-php containers which use the official php:x.x-fpm containers as a base) with:
    • composer 2
    • xDebug 3 with remote debug and profiler preconfigured
    • error reporting enabled
  • MySQL 5.7 with adminer (original mysql container used)
  • Mailhog preconfigured to catch outgoing emails
  • Npm container preconfigured (based on node:latest)
  • Chrome based selenium service available, for running your selenium tests (based on selenium/standalone-chrome-debug)

Requirements

Quick start

git clone https://github.com/OXID-eSales/docker-eshop-sdk.git myProjectName
cd myProjectName

# get some information about whats possible
make help

# setup rights and basic configuration files
make setup

# run example script which prepares several example files for you to see this environment functionality
make example

Access the website through the http://localhost.local

  • phpinfo shown on index page
  • example with database connection
  • example with email sending and catching it with mailhog
    • run the composer install on php container first.

Adminer is available via http://localhost.local:8080

  • Server: mysql
  • Credentials: root/root

Mailhog is available via http://localhost.local:8025/

Longer start

This example shows more precise configuration which can be used for your project. It is real usage flow:

git clone https://github.com/OXID-eSales/docker-eshop-sdk.git myProjectName
cd myProjectName

# setup rights and basic configuration files
make setup

# add php, mysql and apache services (they are grouped in one command, but can be added separately if needed)
make addbasicservices

# add selenium container to the docker-compose
make file=services/selenium-chrome.yml addservice

# ensure you have source directory available, as its configured as webroot by default
mkdir source

# start everything
make up

# stop everything when its enough :)
make down

Running php stuff

We can connect to the php container and do the stuff in there:

make php
php -v

Note: make php is just an alias for docker-compose exec php bash

We can call commands directly without connecting to the container:

docker-compose run php php -v

Running npm commands

Direct call

docker-compose run node npm install bootstrap

Connect to node container

make node

Using Sphinx Container for Documentation Generation

To generate documentation from documentation repositories locally, we have a preconfigured Sphinx container that can be utilized.

To get started, ensure you import our Sphinx container service file using the following command: make addsphinxservice. Here's an example of how to use it:

# Clone shop developer documentation to source directory
git clone https://github.com/OXID-eSales/developer_documentation source/docs

# Add Sphinx container
make docpath=./source/docs addsphinxservice

To regenerate the documentation, simply execute the command make generate-docs. After doing this, you'll find the generated documentation in the source/docs/build directory.

Configurations

Apache

Custom configuration file: containers/httpd/project.conf.

PHP

Select PHP version to be used in docker-compose php container configuration. Custom configuration file for php settings: containers/php/custom.ini.

Remote debugging with PHPSTORM

  • Configure the CLI Interpreter
  • Create a Server configuration and set mapping as source:/var/www/

docker-eshop-sdk's People

Contributors

sieg avatar moritzdemmer avatar marceloxid avatar techrabb1t avatar angel-dimitrov avatar tobiastheiner avatar oxidmichaelwalter avatar joernott avatar matthi711 avatar whitesails 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.