Skip to content

hanafiah/docker-webstack

Repository files navigation

Docker Web Stack

This is general stack for the web development environment with preset Nginx, PHP, MariaDB & MongoDB

You can use this setup for multiple projects.

Put in your project under projects folder and set your nginx.conf there.

Structure

Projects\YOUR_PROJECT_FOLDER\nginx.conf

Please see the example project on how to configure your nginx.conf file projects/example

SubModule project

if you're using git for your projects. you can add that under projects folder using submodule command

cd projects
git submodule add -f [email protected]:hanafiah/example.git 

Virtual host

make sure to set virtual host on hosts file

Mac/Linux

sudo vim /etc/hosts

windows

  1. open notepad as administratio
  2. open hosts file located at
C:\Windows\System32\drivers\etc\hosts

add the following

127.0.0.1 www.example.local

once saved, you should be able to access site from

http://www.example.local

Load Example

run the following command

git submodule update --init 

To Start Docker

run the following command inside your docker-general directory

docker-compose up -d

To stop

docker-compose stop

Alt text

Using php composer

https://github.com/hanafiah/docker-webstack/wiki/How-to-use-composer

Note for Apple M2 processor

some driver might check for the processor for example MS SQL , currently M2 is not supported (err: Unsupported processor architecture.). To mitigate this issue, you can run docker service with emulate platform. for example

  php8.2.fpm.mssql:
        build: php-stack-8.2-fpm-mssql
        container_name: "php8.2.fpm.mssql"
        platform: linux/amd64

About

web dev stack with preset nginx, php & mariadb

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published