MOMO

首页 > /, docker > 本站已使用docker重新部署

本站已使用docker重新部署

May 2018 23

分享一下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

--转载请注明: https://momo.cool/%e6%9c%ac%e7%ab%99%e5%b7%b2%e4%bd%bf%e7%94%a8docker%e9%87%8d%e6%96%b0%e9%83%a8%e7%bd%b2/

说点什么

avatar
  Subscribe  
提醒