Barbara-Pitt
3 years ago
committed by
GitHub
3 changed files with 83 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||||
|
FROM php:5.6-fpm |
||||
|
RUN docker-php-ext-install pdo pdo_mysql |
||||
|
RUN apt-get update -y && apt-get install -y libpng-dev libjpeg-dev |
||||
|
RUN docker-php-ext-install mbstring |
||||
|
RUN apt-get update -y && apt-get install -y libmcrypt-dev |
||||
|
RUN docker-php-ext-install -j$(nproc) mcrypt |
||||
|
RUN docker-php-ext-install iconv |
||||
|
RUN apt-get update -y && apt-get install -y imagemagick |
||||
|
RUN apt-get update -y && apt-get install -y graphicsmagick |
||||
|
RUN apt-get update -y && apt-get install -y gifsicle |
||||
|
RUN docker-php-ext-configure gd \ |
||||
|
--with-png-dir=/usr \ |
||||
|
--with-jpeg-dir=/usr |
||||
|
RUN docker-php-ext-install gd |
||||
|
RUN apt-get update -y \ |
||||
|
&& apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ |
||||
|
&& pecl install memcached-2.2.0 \ |
||||
|
&& echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini \ |
||||
|
&& apt-get remove -y build-essential libmemcached-dev libz-dev \ |
||||
|
&& apt-get autoremove -y \ |
||||
|
&& apt-get clean \ |
||||
|
&& rm -rf /tmp/pear |
@ -0,0 +1,45 @@ |
|||||
|
services: |
||||
|
#nginx webserver + php 5.6 |
||||
|
web: |
||||
|
image: nginx:1.19.6-alpine |
||||
|
ports: |
||||
|
- "8080:80" |
||||
|
depends_on: |
||||
|
- db |
||||
|
volumes: |
||||
|
- ./:/code |
||||
|
- ./site.conf:/etc/nginx/conf.d/default.conf |
||||
|
networks: |
||||
|
leftchan_net: |
||||
|
ipv4_address: 172.20.0.3 |
||||
|
links: |
||||
|
- php |
||||
|
php: |
||||
|
build: . |
||||
|
volumes: |
||||
|
- ./:/code |
||||
|
networks: |
||||
|
leftchan_net: |
||||
|
ipv4_address: 172.20.0.4 |
||||
|
#MySQL Service |
||||
|
db: |
||||
|
image: mysql:5.6.50 |
||||
|
container_name: db |
||||
|
restart: unless-stopped |
||||
|
tty: true |
||||
|
ports: |
||||
|
- "3306:3306" |
||||
|
environment: |
||||
|
MYSQL_DATABASE: lainchan |
||||
|
MYSQL_ROOT_PASSWORD: M9q5lO0RxJVh |
||||
|
networks: |
||||
|
leftchan_net: |
||||
|
ipv4_address: 172.20.0.2 |
||||
|
|
||||
|
#Docker Networks |
||||
|
networks: |
||||
|
leftchan_net: |
||||
|
ipam: |
||||
|
driver: default |
||||
|
config: |
||||
|
- subnet: 172.20.0.0/16 |
@ -0,0 +1,16 @@ |
|||||
|
server { |
||||
|
index index.php index.html; |
||||
|
error_log /var/log/nginx/error.log; |
||||
|
access_log /var/log/nginx/access.log; |
||||
|
root /code; |
||||
|
|
||||
|
location ~ \.php$ { |
||||
|
try_files $uri =404; |
||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
||||
|
fastcgi_pass php:9000; |
||||
|
fastcgi_index index.php; |
||||
|
include fastcgi_params; |
||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
||||
|
fastcgi_param PATH_INFO $fastcgi_path_info; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue