All Projects → Kovah → Docker-Stack

Kovah / Docker-Stack

Licence: other
This repo contains a simple Docker setup with minimal configuration and only few files you can drop into many PHP-based projects.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Docker-Stack

magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (+45.16%)
Mutual labels:  development, development-environment
Developer Roadmap Guide 2018
Stars: ✭ 344 (+1009.68%)
Mutual labels:  development, development-environment
blimp
Web development with docker made easy
Stars: ✭ 12 (-61.29%)
Mutual labels:  development, development-environment
wnmp-dev
Development environment: Windows + nginx + MySQL + PHP
Stars: ✭ 52 (+67.74%)
Mutual labels:  development, mariadb
Cra Build Watch
A script for create-react-app that writes development builds to the disk
Stars: ✭ 110 (+254.84%)
Mutual labels:  development, development-environment
wordless gem
The quickest CLI tool to setup a new WordPress locally. Wordless ready.
Stars: ✭ 38 (+22.58%)
Mutual labels:  development, development-environment
Takeoff
A rapid development environment using docker for convenience.
Stars: ✭ 271 (+774.19%)
Mutual labels:  development, development-environment
container
Custom containers for various usecases
Stars: ✭ 12 (-61.29%)
Mutual labels:  development, development-environment
Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (+180.65%)
Mutual labels:  development, development-environment
Ddev
DDEV-Local: a local PHP development environment system
Stars: ✭ 915 (+2851.61%)
Mutual labels:  development, mariadb
wp-cli-dev
🛠 WP-CLI development environment that allows for easy development across all packages
Stars: ✭ 29 (-6.45%)
Mutual labels:  development, development-environment
Docker Compose Starter
Run your development environment with a simple command using docker-compose 🚀
Stars: ✭ 159 (+412.9%)
Mutual labels:  development, development-environment
Jale
Jale is a blazing fast local development environment for MacOS written in Typescript.
Stars: ✭ 24 (-22.58%)
Mutual labels:  mariadb, development-environment
multi-site-docker
A multi-site-docker configuration featuring nginx, php and mysql
Stars: ✭ 85 (+174.19%)
Mutual labels:  development, development-environment
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+1358.06%)
Mutual labels:  development, development-environment
Koding
The Simplest Way to Manage Your Entire Dev Infrastructure!
Stars: ✭ 1,945 (+6174.19%)
Mutual labels:  development, development-environment
easydock
Dockerize your PHP apps ;)
Stars: ✭ 52 (+67.74%)
Mutual labels:  development, mariadb
CS-study
cs지식을 정리하는 공간
Stars: ✭ 171 (+451.61%)
Mutual labels:  development
mongo-playground
Helps developers run mongo queries
Stars: ✭ 16 (-48.39%)
Mutual labels:  development
typed-prelude
Reliable, standards-oriented software for browsers & Node.
Stars: ✭ 48 (+54.84%)
Mutual labels:  development-environment

Docker Stack

PHP 8 MariaDB nginx Redis Laravel ready!

This repo contains a simple Docker setup you can drop into many PHP-based projects without the configuration and tweaking hassle. Find out more about the idea behind this in my blog post.

Basics

The stack consists of four files from those two are configuration files and one is the .env file you can find in many projects.

Directory structure

/
├─ docker
│  ├─ php.ini
│  └─ nginx.conf
├─ // Your other app files
├─ .env
└─ docker-compose.yml

My default setup consists of PHP, MariaDB as a MySQL-compatible database server, nginx and Redis. All services are defined in the docker-compose.yml file.

Part of the docker-compose

# --- PHP
php:
  container_name: "project-php"
  image: bitnami/php-fpm:8.1
  volumes:
    - .:/app:delegated
    - ./docker/php.ini:/opt/bitnami/php/etc/conf.d/php.ini:ro

# --- nginx
nginx:
  container_name: "project-nginx"
  image: bitnami/nginx:1.21
  ports:
    - "127.0.0.1:80:8080"
  depends_on:
    - php
  volumes:
    - .:/app:delegated
    - ./docker/nginx.conf:/opt/bitnami/nginx/conf/server_blocks/site.conf:ro

This is the definition of the PHP and nginx containers. As you can see it runs with PHP 8. The only things it does is to make the project available in the /app directory (the base directory for all Bitnami containers) and apply your custom php.ini.

Current Service Versions

Service Version
PHP 8.1
MariaDB 10.7
nginx 1.21
Redis 6.2

Setup & Configuration

In most cases you only have to change the .env file because it contains variable details about the stack and passwords. The main stack works for all plain PHP projects, but you can easily make it work with Laravel or any CMS by changing the nginx.conf file because each system may has different requirements on the web server configuration.

Installation and usage

  • Copy the main files (everything except /public, /.github and README.md) to your project
  • Make a copy of the .env.example file and name it .env, or copy the needed values to your existing .env file. Laravel users do not have to copy anything.
  • Make sure the current configuration matches your project setup. CMS like Wordpress or Drupal need additional configuration.
  • Replace dockerstack with your own project name in the APP_NAME variable in the .env file.
  • Run docker-compose up -d.

Docker will then download all images and start them up. By default, port 80 on your host machine is bound to nginx, so you should be able to access your app by opening http://localhost in your browser.

The database is accessible from your local machine only via port 3306.


Docker Stack is a project by Kovah | Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].