add php, mysql & nginx starter template
This commit is contained in:
14
web/other/php-mysql-nginx-starter/.env
Normal file
14
web/other/php-mysql-nginx-starter/.env
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Project settings
|
||||||
|
PROJECT_NAME=project_name
|
||||||
|
|
||||||
|
# MySQL settings
|
||||||
|
MYSQL_USERNAME=some_username
|
||||||
|
MYSQL_PASSWORD=some_password
|
||||||
|
MYSQL_DATABASE=some_database
|
||||||
|
MYSQL_PORT=3306
|
||||||
|
|
||||||
|
# phpMyAdmin settings
|
||||||
|
PMA_PORT=8080
|
||||||
|
|
||||||
|
# PHP + Nginx settings
|
||||||
|
PHP_PORT=80
|
||||||
42
web/other/php-mysql-nginx-starter/docker-compose.yml
Normal file
42
web/other/php-mysql-nginx-starter/docker-compose.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
services:
|
||||||
|
# MySQL
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.4.0
|
||||||
|
container_name: ${PROJECT_NAME}_mysql
|
||||||
|
environment:
|
||||||
|
MYSQL_USERNAME: ${MYSQL_USERNAME}
|
||||||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
|
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
|
||||||
|
ports:
|
||||||
|
- "${MYSQL_PORT}:3306"
|
||||||
|
volumes:
|
||||||
|
- ./mysql:/var/lib/mysql
|
||||||
|
|
||||||
|
# phpMyAdmin
|
||||||
|
pma:
|
||||||
|
image: phpmyadmin:5.2.1-apache
|
||||||
|
container_name: ${PROJECT_NAME}_pma
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
environment:
|
||||||
|
PMA_HOST: mysql
|
||||||
|
PMA_PORT: 3306
|
||||||
|
PMA_USER: ${MYSQL_USERNAME}
|
||||||
|
PMA_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
ports:
|
||||||
|
- "${PMA_PORT}:80"
|
||||||
|
|
||||||
|
# PHP + Apache
|
||||||
|
php:
|
||||||
|
image: webdevops/php-nginx:8.3
|
||||||
|
container_name: ${PROJECT_NAME}_php
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
working_dir: /app
|
||||||
|
environment:
|
||||||
|
WEB_DOCUMENT_ROOT: /app/www
|
||||||
|
ports:
|
||||||
|
- "${PHP_PORT}:80"
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
0
web/other/php-mysql-nginx-starter/www/.gitkeep
Normal file
0
web/other/php-mysql-nginx-starter/www/.gitkeep
Normal file
Reference in New Issue
Block a user