# 【直播连载完毕】主站迁移过程

**URL:** <https://meta.appinn.net/t/topic/4391>\
**Category:** Docker\
**Tags:** docker\
**Created:** [2017 年10 月 16 日 05:49 UTC](https://meta.appinn.net/t/topic/4391 "2017-10-16T05:49:26Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

作者： ![Qingwa](https://meta-edge.appinn.com/user_avatar/meta.appinn.net/qingwa/32/58632_2.png) [@Qingwa](https://meta.appinn.net/u/Qingwa)\
发布日期： [2018 年5 月 15 日 08:11 UTC](https://meta.appinn.net/t/topic/4391/28 "2018-05-15T08:11:10Z")

</div>

最终版本 docker-compose.yml 文件：

```
version: "3"
services:

    nginx:
        image: nginx:latest
        ports:
            - '80:80'
            - '443:443'
        depends_on:
            - redis
        volumes:
            - ./www:/www
            - ./conf/nginx.conf:/etc/nginx/nginx.conf
        links:
            - wordpress
            - redis
            - mysql
        restart: always

    redis:
        image: redis
        restart: always
        volumes:
            - ./conf/redis.conf:/etc/redis/redis.conf
        command: redis-server /etc/redis/redis.conf

    wordpress:
        image: wordpress:php7.1-fpm
        volumes:
            - ./www:/www
            - ./conf/www.conf:/usr/local/etc/php-fpm.d/www.conf
        depends_on:
            - redis
            - mysql
        links:
            - redis
            - mysql
        restart: always

    mysql:
        image: mariadb
        volumes:
            - ./db-data:/var/lib/mysql
            - ./conf/my.cnf:/etc/mysql/my.cnf
        environment:
            - MYSQL_ROOT_PASSWORD=Appinn
        restart: always

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        ports:
            - "8080:80"
        links:
            - mysql
        environment:
            PMA_HOST: mysql

```

---

_[View the full topic](https://meta.appinn.net/t/topic/4391)._
