-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-apache_php_mariadb.yml
45 lines (43 loc) · 1.34 KB
/
docker-compose-apache_php_mariadb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
################################################################################
# Example Web application
# running Apache 2, php 7.1 FPM and mariadb all linked together anbd ready 2 use
################################################################################
version: '2'
services:
php:
# change to :5.6-fpm or :7.1-fpm tag to run another php version
image: ctsmedia/php:7.1-fpm
# Enable xdebug and pass config
#environment:
# ENABLE_XDEBUG=true
# XDEBUG_CONFIG: remote_host=host.docker.internal remote_connect_back=0 profiler_enable=1
ports:
- "9000"
volumes:
- ".:/var/www/share/project"
db:
# you can also use mysql:5.6 for example
image: mariadb:10.1
environment:
# change the mysql root password
MYSQL_ROOT_PASSWORD: ctsmedia
# change the myprojectname to your likings or set custom values each
MYSQL_DATABASE: &project myprojectname
MYSQL_USER: *project
MYSQL_PASSWORD: *project
http:
image: ctsmedia/apache:2.4
environment:
# if the pub dir ist not the src root define the relative path here
PHPFPM_PUBLIC_FOLDER:
# Set php fpm setting if not standard
# PHPFPM_HOST: php
# PHPFPM_PATH: /var/www/share/project/
volumes_from:
- php
depends_on:
# - db
- php
ports:
- "80"
- "443"