Skip to content

Commit 9fae747

Browse files
committed
Initial commit
0 parents  commit 9fae747

File tree

102 files changed

+8684
-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.

102 files changed

+8684
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PROJECT_NAME={PROJECT_NAME}
2+
PROJECT_FOLDER=main

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea
2+
.cache
3+
.config
4+
.yarn
5+
6+
.env
7+
docker-compose.yml

.provision/mysql/my.cnf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[mysqld]
2+
general_log = 1
3+
general_log_file = /var/lib/mysql/general.log

.provision/nginx/.htpasswd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
admin:$apr1$LNpitGXZ$k/C25kRLudEt8.1msf51f.

.provision/nginx/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM nginx:1.14
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
server {
2+
client_max_body_size 5m;
3+
4+
listen 80;
5+
index index.php index.html;
6+
root /var/www/public;
7+
8+
location / {
9+
try_files $uri $uri/ /index.php?$query_string;
10+
}
11+
12+
location ~ \.php$ {
13+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
14+
fastcgi_pass php-fpm:9000;
15+
fastcgi_index index.php;
16+
include fastcgi_params;
17+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
18+
fastcgi_param PATH_INFO $fastcgi_path_info;
19+
}
20+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
server {
2+
3+
client_max_body_size 5m;
4+
5+
listen 80;
6+
index index.php index.html;
7+
root /var/www/public;
8+
9+
location / {
10+
try_files $uri $uri/ /index.php?$query_string;
11+
12+
#auth_basic "Restricted Content";
13+
#auth_basic_user_file /etc/nginx/.htpasswd;
14+
}
15+
16+
location ~ \.php$ {
17+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
18+
fastcgi_pass php-fpm:9000;
19+
fastcgi_index index.php;
20+
include fastcgi_params;
21+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
22+
fastcgi_param PATH_INFO $fastcgi_path_info;
23+
}
24+
}

.provision/php-fpm/Dockerfile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Based on https://github.com/Cyber-Duck/php-fpm-laravel/tree/7.2
2+
FROM php:7.4-fpm
3+
4+
ENV XDEBUG="false"
5+
6+
RUN apt-get update && \
7+
apt-get install -y --force-yes --no-install-recommends \
8+
libmemcached-dev \
9+
libz-dev \
10+
libpq-dev \
11+
libjpeg-dev \
12+
libpng-dev \
13+
libfreetype6-dev \
14+
libssl-dev \
15+
libmcrypt-dev \
16+
openssh-server \
17+
libmagickwand-dev \
18+
git \
19+
cron \
20+
nano \
21+
libxml2-dev
22+
23+
24+
RUN docker-php-ext-install \
25+
soap \
26+
pcntl \
27+
pdo_mysql \
28+
pdo_pgsql \
29+
bcmath
30+
31+
RUN pecl install imagick && \
32+
docker-php-ext-enable imagick
33+
34+
RUN docker-php-ext-configure gd \
35+
--with-freetype \
36+
--with-jpeg && \
37+
docker-php-ext-install gd
38+
39+
RUN docker-php-ext-install exif && \
40+
docker-php-ext-configure exif \
41+
--enable-exif
42+
43+
# Install the xdebug extension
44+
RUN pecl install xdebug && docker-php-ext-enable xdebug
45+
# Copy xdebug configration for remote debugging
46+
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
47+
48+
# Install the php memcached extension
49+
RUN pecl install memcached && docker-php-ext-enable memcached
50+
51+
# Install composer and add its bin to the PATH.
52+
RUN curl -s http://getcomposer.org/installer | php && \
53+
echo "export PATH=${PATH}:/var/www/vendor/bin" >> ~/.bashrc && \
54+
mv composer.phar /usr/local/bin/composer
55+
56+
# Source the bash
57+
RUN . ~/.bashrc
58+
59+
60+
ADD ./php_fpm.ini /usr/local/etc/php/conf.d
61+
62+
RUN rm -r /var/lib/apt/lists/*
63+
64+
RUN usermod -u 1000 www-data
65+
66+
WORKDIR /var/www
67+
68+
COPY ./docker-entrypoint.sh /usr/local/bin/
69+
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
70+
RUN ln -s /usr/local/bin/docker-entrypoint.sh /
71+
ENTRYPOINT ["docker-entrypoint.sh"]
72+
73+
EXPOSE 9000
74+
CMD ["php-fpm"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
service cron start
4+
5+
# Toggle xdebug
6+
if [ "false" == "$XDEBUG" ]; then
7+
sed -i "s/^/;/" /usr/local/etc/php/conf.d/xdebug.ini
8+
sed -i "s/^/;/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
9+
fi
10+
11+
exec "$@"

.provision/php-fpm/php_fpm.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
date.timezone=UTC
2+
display_errors=Off
3+
log_errors=On
4+
5+
; Maximum amount of memory a script may consume (128MB)
6+
; http://php.net/memory-limit
7+
memory_limit = 128M
8+
; Maximum allowed size for uploaded files.
9+
; http://php.net/upload-max-filesize
10+
upload_max_filesize = 20M
11+
; Sets max size of post data allowed.
12+
; http://php.net/post-max-size
13+
post_max_size = 20M

0 commit comments

Comments
 (0)