本站已使用docker重新部署

分享一下docker-compose配置

docker-compose.yml

version: '2'

services:

    wordpress:
        build: ./docker
    restart: always
        ports:
            - 80:80
            - 443:443
        environment:
        WORDPRESS_DB_PASSWORD: xxx
        volumes:
            - /data:/var/www/html/

    mysql:
            image: mysql:5.7
            restart: always
        environment:
            MYSQL_ROOT_PASSWORD: xxx

Dockerfile:

FROM wordpress:4.9.6-php7.1-apache

RUN apt-get update && \
        apt-get install -y  --no-install-recommends ssl-cert && \
        rm -r /var/lib/apt/lists/* && \
        a2enmod ssl && \
        a2ensite default-ssl
COPY 000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY default-ssl.conf /etc/apache2/sites-enabled/default-ssl.conf 
COPY 1_root_bundle.crt /usr/share/ca/Apache/1_root_bundle.crt
COPY 2_xxxl.crt /usr/share/ca/Apache/2_xxxl.crt
COPY 3_xxx.key /usr/share/ca/Apache/3_xxx.key

EXPOSE 80
EXPOSE 443

说点什么

avatar
  Subscribe  
提醒
Optimized with PageSpeed Ninja