Skip to content

Commit 4355d48

Browse files
committed
init
0 parents  commit 4355d48

File tree

1,748 files changed

+901707
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,748 files changed

+901707
-0
lines changed

.env.example

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
HOST=localhost
2+
3+
DB_HOST=mysqldb
4+
DB_NAME=vuewp
5+
DB_USER=vuewp
6+
DB_PASSWORD=secret
7+
8+
WP_ENV=development
9+
WP_HOME=http://${HOST}
10+
WP_SITEURL=${WP_HOME}/wp

.gitignore.example

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.htaccess
2+
.htpasswd
3+
/wp-content/uploads/*
4+
# wp-content/themes/salons/inc/*
5+
# wp-content/themes/cca/inc/*
6+
config-local-mg.php
7+
# Fichiers specifique a PHPStorm.
8+
*.idea/*
9+
/data/
10+
/.env
11+
/docker-compose.override.yml

Dockerfile

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
FROM php:7.0-apache
2+
3+
LABEL description="Apache & PHP7.0 image for wordpress app with ssmtp."
4+
5+
# install the PHP extensions we need
6+
RUN set -ex; \
7+
\
8+
apt-get update; \
9+
apt-get install -y \
10+
openssl \
11+
libmcrypt-dev \
12+
libjpeg-dev \
13+
libpng-dev \
14+
ssmtp \
15+
mailutils \
16+
; \
17+
rm -rf /var/lib/apt/lists/*; \
18+
\
19+
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
20+
docker-php-ext-install gd mysqli pdo pdo_mysql opcache mcrypt gettext
21+
22+
RUN apt-get install -y zlib1g-dev; \
23+
rm -rf /var/lib/apt/lists/* ; \
24+
docker-php-ext-install zip
25+
26+
# set up sendmail config, see http://linux.die.net/man/5/ssmtp.conf for options
27+
RUN echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf
28+
RUN echo "root=h.rakotonjanahary@gmail.com" >> /etc/ssmtp/ssmtp.conf
29+
RUN echo "mailhub=maildev" >> /etc/ssmtp/ssmtp.conf
30+
# The above 'maildev' is the name you used for the link command
31+
# in your docker-compose file or docker link command.
32+
# Docker automatically adds that name in the hosts file
33+
# of the container you're linking MailDev to.
34+
35+
# Set up php sendmail config
36+
RUN echo "sendmail_path=sendmail -i -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
37+
38+
# Fully qualified domain name configuration for sendmail on localhost.
39+
# Without this sendmail will not work.
40+
# This must match the value for 'hostname' field that you set in ssmtp.conf.
41+
RUN echo "localhost localhost.localdomain" >> /etc/hosts
42+
43+
# set recommended PHP.ini settings
44+
# see https://secure.php.net/manual/en/opcache.installation.php
45+
RUN { \
46+
echo 'opcache.memory_consumption=128'; \
47+
echo 'opcache.interned_strings_buffer=8'; \
48+
echo 'opcache.max_accelerated_files=4000'; \
49+
echo 'opcache.revalidate_freq=2'; \
50+
echo 'opcache.fast_shutdown=1'; \
51+
echo 'opcache.enable_cli=1'; \
52+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
53+
54+
# enable apache module
55+
RUN a2enmod headers rewrite expires
56+
57+
# Register volume
58+
VOLUME /var/www/html
59+
60+
# apache2 foreground
61+
CMD ["apache2-foreground"]

docker-compose.override.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3'
2+
services:
3+
web:
4+
ports:
5+
- 80:80
6+
- 443:443
7+
mysqldb:
8+
ports:
9+
- 3306:3306
10+
phpmyadmin:
11+
image: phpmyadmin/phpmyadmin
12+
environment:
13+
- PMA_HOST=mysqldb
14+
- PMA_PORT=3306
15+
ports:
16+
- 8080:80

docker-compose.override.yml.example

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3'
2+
services:
3+
web:
4+
ports:
5+
- 80:80
6+
- 443:443
7+
mysqldb:
8+
ports:
9+
- 3306:3306
10+
phpmyadmin:
11+
image: phpmyadmin/phpmyadmin
12+
environment:
13+
- PMA_HOST=mysqldb
14+
- PMA_PORT=3306
15+
ports:
16+
- 8080:80

docker-compose.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: '3'
2+
3+
services:
4+
web:
5+
image: nginx:alpine
6+
volumes:
7+
- ./:/var/www/html
8+
- ./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template
9+
environment:
10+
- HOST=${HOST}
11+
command: >
12+
/bin/sh -c "cp /etc/nginx/conf.d/default.template /etc/nginx/conf.d/default.conf
13+
&& export hosts=\"$$(echo $$HOST | sed 's/,/ /g')\"
14+
&& envsubst '$$hosts' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf
15+
&& nginx -g 'daemon off;'"
16+
depends_on:
17+
- php
18+
- mysqldb
19+
php:
20+
image: fulldigits/php:7.2-wordpress
21+
volumes:
22+
- ./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini
23+
- ./:/var/www/html
24+
- ./data/uploads:/var/www/html/wp-content/uploads
25+
26+
mysqldb:
27+
image: mysql:5
28+
environment:
29+
- MYSQL_DATABASE=${DB_NAME}
30+
- MYSQL_RANDOM_ROOT_PASSWORD='yes'
31+
- MYSQL_USER=${DB_USER}
32+
- MYSQL_PASSWORD=${DB_PASSWORD}
33+
volumes:
34+
- ./data/db/mysql:/var/lib/mysql
35+
36+
volumes:
37+
tdc-node-modules:
38+
tdc-caches:

etc/nginx/default.template.conf

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Nginx configuration
2+
3+
server {
4+
listen 80 default_server;
5+
listen [::]:80 default_server;
6+
server_name ${hosts};
7+
8+
index index.php index.html;
9+
error_log /var/log/nginx/error.log;
10+
access_log /var/log/nginx/access.log;
11+
root /var/www/html/;
12+
13+
charset utf-8;
14+
sendfile off;
15+
16+
location / {
17+
try_files $uri $uri/ /index.php?$args;
18+
}
19+
20+
location ~ \.php$ {
21+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
22+
fastcgi_pass php:9000;
23+
fastcgi_index index.php;
24+
include fastcgi_params;
25+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
26+
fastcgi_param PATH_INFO $fastcgi_path_info;
27+
}
28+
}

etc/php/php.ini

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
; PHP Configuration
2+
3+
;[Date]
4+
; Defines the default timezone used by the date functions
5+
; http://php.net/date.timezone
6+
;date.timezone =
7+
8+
; Error handling
9+
;display_errors = Off
10+
11+
; Xdebug
12+
; See https://xdebug.org/docs/all_settings
13+
14+
;PHPStorm
15+
[Xdebug]
16+
xdebug.remote_enable=1
17+
xdebug.idekey=PHPSTORM
18+
xdebug.profiler_enable=0
19+
xdebug.max_nesting_level=700
20+
xdebug.remote_host=192.168.0.1 # your ip
21+
xdebug.remote_port=9000
22+
23+
;Netbeans
24+
;[Xdebug]
25+
;xdebug.remote_enable=1
26+
;xdebug.remote_handler=dbgp
27+
;xdebug.remote_mode=req
28+
;xdebug.remote_host=192.168.0.1 # your ip
29+
;xdebug.remote_port=9000

index.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* Front to the WordPress application. This file doesn't do anything, but loads
4+
* wp-blog-header.php which does and tells WordPress to load the theme.
5+
*
6+
* @package WordPress
7+
*/
8+
9+
/**
10+
* Tells WordPress to load the WordPress theme and output it.
11+
*
12+
* @var bool
13+
*/
14+
define( 'WP_USE_THEMES', true );
15+
16+
/** Loads the WordPress Environment and Template */
17+
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

0 commit comments

Comments
 (0)